aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 6d21b138d..88e81c631 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -217,8 +217,7 @@ static void sh_freeentry(void *freethis)
{
struct Curl_sh_entry *p = (struct Curl_sh_entry *) freethis;
- if(p)
- free(p);
+ free(p);
}
static size_t fd_key_compare(void *k1, size_t k1_len, void *k2, size_t k2_len)
@@ -1582,8 +1581,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(!retry) {
/* if the URL is a follow-location and not just a retried request
then figure out the URL here */
- if(newurl)
- free(newurl);
+ free(newurl);
newurl = data->req.newurl;
data->req.newurl = NULL;
follow = FOLLOW_REDIR;
@@ -1608,8 +1606,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* but first check to see if we got a location info even though we're
not following redirects */
if(data->req.location) {
- if(newurl)
- free(newurl);
+ free(newurl);
newurl = data->req.location;
data->req.location = NULL;
result = Curl_follow(data, newurl, FOLLOW_FAKE);
@@ -1624,8 +1621,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
}
}
- if(newurl)
- free(newurl);
+ free(newurl);
break;
}