{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/infer/issues/95","labels_url":"https://api.github.com/repos/facebook/infer/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/facebook/infer/issues/95/comments","events_url":"https://api.github.com/repos/facebook/infer/issues/95/events","html_url":"https://github.com/facebook/infer/issues/95","id":90455646,"number":95,"title":"Obj-C False positive: malloc used to pass buffer to NSData using freeWhenDone","user":{"login":"loufranco","id":534999,"avatar_url":"https://avatars.githubusercontent.com/u/534999?v=3","gravatar_id":"","url":"https://api.github.com/users/loufranco","html_url":"https://github.com/loufranco","followers_url":"https://api.github.com/users/loufranco/followers","following_url":"https://api.github.com/users/loufranco/following{/other_user}","gists_url":"https://api.github.com/users/loufranco/gists{/gist_id}","starred_url":"https://api.github.com/users/loufranco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loufranco/subscriptions","organizations_url":"https://api.github.com/users/loufranco/orgs","repos_url":"https://api.github.com/users/loufranco/repos","events_url":"https://api.github.com/users/loufranco/events{/privacy}","received_events_url":"https://api.github.com/users/loufranco/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-23T18:20:43Z","updated_at":"2015-06-23T19:25:03Z","closed_at":"2015-06-23T19:25:03Z","body":"This code snippet\r\n\r\n```objectivec\r\nuint8_t *buffer = malloc(size * sizeof(uint8_t));\r\n/// fill buffer code here\r\nreturn [NSData dataWithBytesNoCopy:buffer length:size freeWhenDone:YES];\r\n```\r\n\r\nis flagged as \r\n\r\n```\r\nerror: MEMORY_LEAK\r\n   memory dynamically allocated to buffer by call to malloc() at line ... is not reachable after line ...\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/infer/issues/comments/114616273","html_url":"https://github.com/facebook/infer/issues/95#issuecomment-114616273","issue_url":"https://api.github.com/repos/facebook/infer/issues/95","id":114616273,"user":{"login":"dulmarod","id":7913252,"avatar_url":"https://avatars.githubusercontent.com/u/7913252?v=3","gravatar_id":"","url":"https://api.github.com/users/dulmarod","html_url":"https://github.com/dulmarod","followers_url":"https://api.github.com/users/dulmarod/followers","following_url":"https://api.github.com/users/dulmarod/following{/other_user}","gists_url":"https://api.github.com/users/dulmarod/gists{/gist_id}","starred_url":"https://api.github.com/users/dulmarod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dulmarod/subscriptions","organizations_url":"https://api.github.com/users/dulmarod/orgs","repos_url":"https://api.github.com/users/dulmarod/repos","events_url":"https://api.github.com/users/dulmarod/events{/privacy}","received_events_url":"https://api.github.com/users/dulmarod/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T19:25:03Z","updated_at":"2015-06-23T19:25:03Z","body":"Duplicate of https://github.com/facebook/infer/issues/52."}}