diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-09-30 14:10:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-09-30 23:40:50 +0200 |
commit | 8392a0cf612eaf045addc0b5d8da6d287be33907 (patch) | |
tree | ddc0e573867ddff1937d7be68b3e8b68cfc3346f /lib | |
parent | cecffff561b4cb5707510cfbc0bc41fe0e5b346a (diff) | |
download | curl-8392a0cf612eaf045addc0b5d8da6d287be33907.tar.gz |
cookie: fix memory leak if path was set twice in header
... this will let the second occurance override the first.
Added test 1161 to verify.
Reported-by: Max Dymond
Fixes #1932
Closes #1933
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cookie.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index 1d7defd84..271f6d49d 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -499,6 +499,7 @@ Curl_cookie_add(struct Curl_easy *data, badcookie = TRUE; /* out of memory bad */ break; } + free(co->spath); /* if this is set again */ co->spath = sanitize_cookie_path(co->path); if(!co->spath) { badcookie = TRUE; /* out of memory bad */ |