]> granicus.if.org Git - curl/commitdiff
tool: Fixed a memory leak on OOM introduced in 19cb0c4a
authorDan Fandrich <dan@coneharvesters.com>
Sun, 8 Nov 2015 15:50:25 +0000 (16:50 +0100)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 8 Nov 2015 15:50:25 +0000 (16:50 +0100)
src/slist_wc.c

index f4767ad849ef65c3fc1c3fe91597296512b4c9ba..d715bb21fa349cc3905593fc4c95748a3b352c3d 100644 (file)
@@ -45,7 +45,7 @@ struct slist_wc *slist_wc_append(struct slist_wc *list,
     list = malloc(sizeof(struct slist_wc));
 
     if(!list) {
-      free(new_item);
+      curl_slist_free_all(new_item);
       return NULL;
     }