{"action":"created","issue":{"url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/32","repository_url":"https://api.github.com/repos/mmaraya/netkit-ftp","labels_url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/32/comments","events_url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/32/events","html_url":"https://github.com/mmaraya/netkit-ftp/issues/32","id":138794429,"number":32,"title":"CID 73116: Incorrect deallocator used (CWE-762)","user":{"login":"mmaraya","id":6063732,"avatar_url":"https://avatars.githubusercontent.com/u/6063732?v=3","gravatar_id":"","url":"https://api.github.com/users/mmaraya","html_url":"https://github.com/mmaraya","followers_url":"https://api.github.com/users/mmaraya/followers","following_url":"https://api.github.com/users/mmaraya/following{/other_user}","gists_url":"https://api.github.com/users/mmaraya/gists{/gist_id}","starred_url":"https://api.github.com/users/mmaraya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmaraya/subscriptions","organizations_url":"https://api.github.com/users/mmaraya/orgs","repos_url":"https://api.github.com/users/mmaraya/repos","events_url":"https://api.github.com/users/mmaraya/events{/privacy}","received_events_url":"https://api.github.com/users/mmaraya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mmaraya/netkit-ftp/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/mmaraya/netkit-ftp/labels/security","name":"security","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"mmaraya","id":6063732,"avatar_url":"https://avatars.githubusercontent.com/u/6063732?v=3","gravatar_id":"","url":"https://api.github.com/users/mmaraya","html_url":"https://github.com/mmaraya","followers_url":"https://api.github.com/users/mmaraya/followers","following_url":"https://api.github.com/users/mmaraya/following{/other_user}","gists_url":"https://api.github.com/users/mmaraya/gists{/gist_id}","starred_url":"https://api.github.com/users/mmaraya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmaraya/subscriptions","organizations_url":"https://api.github.com/users/mmaraya/orgs","repos_url":"https://api.github.com/users/mmaraya/repos","events_url":"https://api.github.com/users/mmaraya/events{/privacy}","received_events_url":"https://api.github.com/users/mmaraya/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-06T14:17:41Z","updated_at":"2016-03-06T15:04:40Z","closed_at":"2016-03-06T15:04:40Z","body":"This new defect was introduced in https://github.com/mmaraya/netkit-ftp/commit/52c0978dcc1f18029907eb1f339338e437e039d8 when attempting to close #17.\r\n\r\n[ftp/ftp.c#L513](https://github.com/mmaraya/netkit-ftp/blob/52c0978dcc1f18029907eb1f339338e437e039d8/ftp/ftp.c#L513)\r\n```\r\nalloc: Allocation of memory which must be freed using pclose.\r\nassign: Assigning: fin = popen(local + 1, \"r\").\r\n```\r\n[ftp/ftp.c#L547](https://github.com/mmaraya/netkit-ftp/blob/52c0978dcc1f18029907eb1f339338e437e039d8/ftp/ftp.c#L547)\r\n```\r\nfree: Calling fclose frees fin using fclose but it should have been freed using pclose.\r\n```\r\nDepending on the difference between the correct and incorrect allocator, there may be a resource leak or memory corruption. In sendrequest: A resource is freed using the wrong deallocator ([CWE-762](https://cwe.mitre.org/data/definitions/762.html))\r\n"},"comment":{"url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/comments/192904837","html_url":"https://github.com/mmaraya/netkit-ftp/issues/32#issuecomment-192904837","issue_url":"https://api.github.com/repos/mmaraya/netkit-ftp/issues/32","id":192904837,"user":{"login":"mmaraya","id":6063732,"avatar_url":"https://avatars.githubusercontent.com/u/6063732?v=3","gravatar_id":"","url":"https://api.github.com/users/mmaraya","html_url":"https://github.com/mmaraya","followers_url":"https://api.github.com/users/mmaraya/followers","following_url":"https://api.github.com/users/mmaraya/following{/other_user}","gists_url":"https://api.github.com/users/mmaraya/gists{/gist_id}","starred_url":"https://api.github.com/users/mmaraya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmaraya/subscriptions","organizations_url":"https://api.github.com/users/mmaraya/orgs","repos_url":"https://api.github.com/users/mmaraya/repos","events_url":"https://api.github.com/users/mmaraya/events{/privacy}","received_events_url":"https://api.github.com/users/mmaraya/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T15:04:40Z","updated_at":"2016-03-06T15:04:40Z","body":"Fixed, but Coverity still reports #17 as open."}}