From: Daniel Stenberg Date: Wed, 24 Oct 2001 11:36:55 +0000 (+0000) Subject: T. Bharath found this memory leak. It occurs when we replace an internally X-Git-Tag: upstream/7.37.1~16163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6822f5a7f4b188dd09f9c0a582d8e76c63be7c3;p=platform%2Fupstream%2Fcurl.git T. Bharath found this memory leak. It occurs when we replace an internally already existing cookie with a new one. --- diff --git a/lib/cookie.c b/lib/cookie.c index 97330cb..bac0adb 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 */ } }