Commit fa394c8c authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

cookie: avoid NULL dereference

... when expiring old cookies.

Reported-by: Pavel Gushchin
Fixes #2032
Closes #2035
parent 52d9a11c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ static void remove_expired(struct CookieInfo *cookies)
  while(co) {
    nx = co->next;
    if(co->expires && co->expires < now) {
      if(co == cookies->cookies) {
      if(!pv) {
        cookies->cookies = co->next;
      }
      else {