Bug #149: Deletion of unnecessary checks before a few calls of cURL functions

The following functions return immediately if a null pointer was passed.
* Curl_cookie_cleanup
* curl_formfree

It is therefore not needed that a function caller repeats a corresponding check.

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
This commit is contained in:
Markus Elfring
2015-03-11 18:15:33 +01:00
committed by Daniel Stenberg
parent 29c655c0a6
commit 9e661601fe
3 changed files with 3 additions and 6 deletions

View File

@@ -198,8 +198,7 @@ curl_share_cleanup(CURLSH *sh)
}
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(share->cookies)
Curl_cookie_cleanup(share->cookies);
Curl_cookie_cleanup(share->cookies);
#endif
#ifdef USE_SSL