From c6822f5a7f4b188dd09f9c0a582d8e76c63be7c3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Oct 2001 11:36:55 +0000 Subject: T. Bharath found this memory leak. It occurs when we replace an internally already existing cookie with a new one. --- lib/cookie.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/cookie.c b/lib/cookie.c index 97330cbc7..bac0adb2f 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -374,6 +374,9 @@ Curl_cookie_add(struct CookieInfo *c, free(clist->maxage); *clist = *co; /* then store all the new data */ + + free(co); /* free the newly alloced memory */ + co = clist; /* point to the previous struct instead */ } } -- cgit v1.2.3