diff --git a/lib/formdata.c b/lib/formdata.c index 3f41a42755..3076a14370 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -969,8 +969,7 @@ void curl_formfree(struct curl_httppost *form) next=form->next; /* the following form line */ /* recurse to sub-contents */ - if(form->more) - curl_formfree(form->more); + curl_formfree(form->more); if(!(form->flags & HTTPPOST_PTRNAME)) free(form->name); /* free the name */ diff --git a/lib/share.c b/lib/share.c index b8b6bee803..3fc53119ec 100644 --- a/lib/share.c +++ b/lib/share.c @@ -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 diff --git a/lib/url.c b/lib/url.c index eec11a0e38..eb98e361b7 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2150,8 +2150,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) if(data->share->cookies) { /* use shared cookie list, first free own one if any */ - if(data->cookies) - Curl_cookie_cleanup(data->cookies); + Curl_cookie_cleanup(data->cookies); /* enable cookies since we now use a share that uses cookies! */ data->cookies = data->share->cookies; }