{"action":"closed","issue":{"url":"https://api.github.com/repos/lpsmith/postgresql-libpq/issues/27","labels_url":"https://api.github.com/repos/lpsmith/postgresql-libpq/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/lpsmith/postgresql-libpq/issues/27/comments","events_url":"https://api.github.com/repos/lpsmith/postgresql-libpq/issues/27/events","html_url":"https://github.com/lpsmith/postgresql-libpq/issues/27","id":53010879,"number":27,"title":"Possibility of memory leaks with asynchronous exceptions","user":{"login":"arybczak","id":387658,"avatar_url":"https://avatars.githubusercontent.com/u/387658?v=3","gravatar_id":"","url":"https://api.github.com/users/arybczak","html_url":"https://github.com/arybczak","followers_url":"https://api.github.com/users/arybczak/followers","following_url":"https://api.github.com/users/arybczak/following{/other_user}","gists_url":"https://api.github.com/users/arybczak/gists{/gist_id}","starred_url":"https://api.github.com/users/arybczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arybczak/subscriptions","organizations_url":"https://api.github.com/users/arybczak/orgs","repos_url":"https://api.github.com/users/arybczak/repos","events_url":"https://api.github.com/users/arybczak/events{/privacy}","received_events_url":"https://api.github.com/users/arybczak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-28T22:02:01Z","updated_at":"2015-07-16T18:26:02Z","closed_at":"2015-07-16T18:26:02Z","body":"Any code that follows the pattern \"allocate bare resource using a function imported from C, then create a foreign pointer that manages the resource\" needs to mask asynchronous exceptions, since if exception arrives between allocation and wrapping, memory leaks. This is particularly dangerous in `connectdb`, since such code may eventually run out of reachable database connections, completely blocking the access to the database."}}