aboutsummaryrefslogtreecommitdiff
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 12:06:34 +0200
commit20ea22ff735097a02721fcb5cd44433973af6190 (patch)
tree3350749c17983702b2ece3ef08776f4096b724ac
parent49d75a4c15393d66e9f3e0ce289a610da4d6e5a9 (diff)
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 Closes #1930
-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;