{"action":"created","issue":{"url":"https://api.github.com/repos/bagder/curl/issues/156","labels_url":"https://api.github.com/repos/bagder/curl/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/bagder/curl/issues/156/comments","events_url":"https://api.github.com/repos/bagder/curl/issues/156/events","html_url":"https://github.com/bagder/curl/pull/156","id":60221177,"number":156,"title":"Deletion of unnecessary checks before some function calls","user":{"login":"elfring","id":660477,"avatar_url":"https://avatars.githubusercontent.com/u/660477?v=3","gravatar_id":"","url":"https://api.github.com/users/elfring","html_url":"https://github.com/elfring","followers_url":"https://api.github.com/users/elfring/followers","following_url":"https://api.github.com/users/elfring/following{/other_user}","gists_url":"https://api.github.com/users/elfring/gists{/gist_id}","starred_url":"https://api.github.com/users/elfring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfring/subscriptions","organizations_url":"https://api.github.com/users/elfring/orgs","repos_url":"https://api.github.com/users/elfring/repos","events_url":"https://api.github.com/users/elfring/events{/privacy}","received_events_url":"https://api.github.com/users/elfring/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-07T19:42:31Z","updated_at":"2015-03-09T23:07:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bagder/curl/pulls/156","html_url":"https://github.com/bagder/curl/pull/156","diff_url":"https://github.com/bagder/curl/pull/156.diff","patch_url":"https://github.com/bagder/curl/pull/156.patch"},"body":"* [The function \"free\"](http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first \"Free a null pointer anyway or check first?\") is documented in the way that no action shall occur for a passed null pointer. Redundant safety checks can be avoided.\r\n* The following functions perform also input parameter validation.\r\n  * [Curl_cookie_cleanup](https://github.com/bagder/curl/blob/df5578a7a304a23f9aa3670daff8573ec3ef416f/lib/cookie.c#L1207 \"Cookie clean-up\")\r\n  * [curl_formfree](https://github.com/bagder/curl/blob/df5578a7a304a23f9aa3670daff8573ec3ef416f/lib/formdata.c#L956 \"Release a form post chain.\")\r\n\r\n  It is therefore not needed that a function caller repeats a corresponding check."},"comment":{"url":"https://api.github.com/repos/bagder/curl/issues/comments/77963871","html_url":"https://github.com/bagder/curl/pull/156#issuecomment-77963871","issue_url":"https://api.github.com/repos/bagder/curl/issues/156","id":77963871,"user":{"login":"jay","id":965580,"avatar_url":"https://avatars.githubusercontent.com/u/965580?v=3","gravatar_id":"","url":"https://api.github.com/users/jay","html_url":"https://github.com/jay","followers_url":"https://api.github.com/users/jay/followers","following_url":"https://api.github.com/users/jay/following{/other_user}","gists_url":"https://api.github.com/users/jay/gists{/gist_id}","starred_url":"https://api.github.com/users/jay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay/subscriptions","organizations_url":"https://api.github.com/users/jay/orgs","repos_url":"https://api.github.com/users/jay/repos","events_url":"https://api.github.com/users/jay/events{/privacy}","received_events_url":"https://api.github.com/users/jay/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T23:07:03Z","updated_at":"2015-03-09T23:07:03Z","body":"@elfring I put in a pr for the memanalyze issue. You'd still need to take care of the three code style issues Daniel mentioned earlier if you want to pursue this further."}}