Call free once a resource has been closed.
Merge branch 'master' into amqp-only