summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-29 08:50:15 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-29 08:54:36 +0200
commitb586e33fc592c58144e3256074fb9bf1acc19415 (patch)
tree3350749c17983702b2ece3ef08776f4096b724ac
parent49d75a4c15393d66e9f3e0ce289a610da4d6e5a9 (diff)
downloadcurl-b586e33fc592c58144e3256074fb9bf1acc19415.tar.gz
cookie: fix memory leak on oversized rejection
Regression brought by 2bc230de63b Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3513 Assisted-by: Max Dymond
-rw-r--r--lib/cookie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 0374f94c1..1d7defd84 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -438,7 +438,7 @@ Curl_cookie_add(struct Curl_easy *data,
/* too long individual name or contents, or too long combination of
name + contents. Chrome and Firefox support 4095 or 4096 bytes
combo. */
- free(co);
+ freecookie(co);
infof(data, "oversized cookie dropped, name/val %d + %d bytes\n",
nlen, len);
return NULL;