added precautions to not go insane when two matching cookies end up in the

cookie list, even though they're not supposed to do that...
This commit is contained in:
Daniel Stenberg 2002-01-07 14:56:15 +00:00
parent 2b14916813
commit d9a7773011

View File

@ -377,8 +377,15 @@ Curl_cookie_add(struct CookieInfo *c,
free(co); /* free the newly alloced memory */
co = clist; /* point to the previous struct instead */
}
/* We have replaced a cookie, now skip the rest of the list but
make sure the 'lastc' pointer is properly set */
do {
lastc = clist;
clist = clist->next;
} while(clist);
break;
}
}
lastc = clist;
clist = clist->next;