]> granicus.if.org Git - curl/commitdiff
Removed superfluous check of clist->name, as in this code path that pointer
authorDaniel Stenberg <daniel@haxx.se>
Mon, 13 Oct 2008 21:03:12 +0000 (21:03 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 13 Oct 2008 21:03:12 +0000 (21:03 +0000)
has already been dereferenced so it is bound to be valid. Pointed out to us
by coverity.com

lib/cookie.c

index ed541a12fd3bbc8ff0129d89ee1f077b852018d5..982bed063af3eeb537e76ba82983491ce0eb9bed 100644 (file)
@@ -614,8 +614,7 @@ Curl_cookie_add(struct SessionHandle *data,
         co->next = clist->next; /* get the next-pointer first */
 
         /* then free all the old pointers */
-        if(clist->name)
-          free(clist->name);
+        free(clist->name);
         if(clist->value)
           free(clist->value);
         if(clist->domain)