aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/multi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 80fe6b580..dd196b7eb 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2447,8 +2447,10 @@ multi_addtimeout(struct curl_llist *timeoutlist,
/* else
this is the first timeout on the list */
- if(!Curl_llist_insert_next(timeoutlist, prev, timedup))
+ if(!Curl_llist_insert_next(timeoutlist, prev, timedup)) {
+ free(timedup);
return CURLM_OUT_OF_MEMORY;
+ }
return CURLM_OK;
}