From eb25dd3be2369cdf348cb28b193999ea87b0f507 Mon Sep 17 00:00:00 2001 From: Yasuharu Yamada Date: Tue, 2 Apr 2013 11:45:15 +0200 Subject: Curl_cookie_add: only increase numcookies for new cookies Count up numcookies in Curl_cookie_add() only when cookie is new one --- lib/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/cookie.c b/lib/cookie.c index 18b91559c..c11197679 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -689,9 +689,9 @@ Curl_cookie_add(struct SessionHandle *data, lastc->next = co; else c->cookies = co; + c->numcookies++; /* one more cookie in the jar */ } - c->numcookies++; /* one more cookie in the jar */ return co; } -- cgit v1.2.3