From 729b92afbe4a350ee725a5001f041170dd12789b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sun, 8 Nov 2015 16:50:25 +0100 Subject: [PATCH] tool: Fixed a memory leak on OOM introduced in 19cb0c4a --- src/slist_wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slist_wc.c b/src/slist_wc.c index f4767ad849..d715bb21fa 100644 --- a/src/slist_wc.c +++ b/src/slist_wc.c @@ -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; }