{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/rugged/issues/525","labels_url":"https://api.github.com/repos/libgit2/rugged/issues/525/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/rugged/issues/525/comments","events_url":"https://api.github.com/repos/libgit2/rugged/issues/525/events","html_url":"https://github.com/libgit2/rugged/pull/525","id":108907724,"number":525,"title":"Ensure DB backends haven't already been freed","user":{"login":"tpickett66","id":232175,"avatar_url":"https://avatars.githubusercontent.com/u/232175?v=3","gravatar_id":"","url":"https://api.github.com/users/tpickett66","html_url":"https://github.com/tpickett66","followers_url":"https://api.github.com/users/tpickett66/followers","following_url":"https://api.github.com/users/tpickett66/following{/other_user}","gists_url":"https://api.github.com/users/tpickett66/gists{/gist_id}","starred_url":"https://api.github.com/users/tpickett66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpickett66/subscriptions","organizations_url":"https://api.github.com/users/tpickett66/orgs","repos_url":"https://api.github.com/users/tpickett66/repos","events_url":"https://api.github.com/users/tpickett66/events{/privacy}","received_events_url":"https://api.github.com/users/tpickett66/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-29T16:33:20Z","updated_at":"2015-09-30T19:19:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libgit2/rugged/pulls/525","html_url":"https://github.com/libgit2/rugged/pull/525","diff_url":"https://github.com/libgit2/rugged/pull/525.diff","patch_url":"https://github.com/libgit2/rugged/pull/525.patch"},"body":"When DB backends are successfully attached to the DB instacnes they\r\nget freed along with the DB so we don't have to. Also, the free method\r\non the backends is optional so we shouldn't assume it is present.\r\n\r\nFixes: #524 "},"comment":{"url":"https://api.github.com/repos/libgit2/rugged/issues/comments/144512027","html_url":"https://github.com/libgit2/rugged/pull/525#issuecomment-144512027","issue_url":"https://api.github.com/repos/libgit2/rugged/issues/525","id":144512027,"user":{"login":"tpickett66","id":232175,"avatar_url":"https://avatars.githubusercontent.com/u/232175?v=3","gravatar_id":"","url":"https://api.github.com/users/tpickett66","html_url":"https://github.com/tpickett66","followers_url":"https://api.github.com/users/tpickett66/followers","following_url":"https://api.github.com/users/tpickett66/following{/other_user}","gists_url":"https://api.github.com/users/tpickett66/gists{/gist_id}","starred_url":"https://api.github.com/users/tpickett66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpickett66/subscriptions","organizations_url":"https://api.github.com/users/tpickett66/orgs","repos_url":"https://api.github.com/users/tpickett66/repos","events_url":"https://api.github.com/users/tpickett66/events{/privacy}","received_events_url":"https://api.github.com/users/tpickett66/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T19:19:19Z","updated_at":"2015-09-30T19:19:19Z","body":"I was confused by it too but it's [in the docs](https://libgit2.github.com/libgit2/#HEAD/type/git_refdb_backend) and `[odb_free](https://github.com/libgit2/libgit2/blob/master/src/odb.c#L595-L614)` checks that the function is set before deciding what to do. There's something similar for the [refdb](https://github.com/libgit2/libgit2/blob/master/src/refdb.c#L62-L70) too :-)"}}