]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookie: set ->running in cookie_init even if data is NULL
authorDaniel Stenberg <daniel@haxx.se>
Mon, 18 Sep 2023 07:06:53 +0000 (09:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 19 Sep 2023 06:26:07 +0000 (08:26 +0200)
This is a regression introduced in b1b326ec500 (shipped in curl 8.1.0)

Test 3103 verifies.

Fixes #11875
Reported-by: wangp on github
Closes #11876

lib/cookie.c

index 37d1113d2964d3055a7c5ff59d576dd031117e76..af01203a9a26c48b177d33edc15c1bea297a585a 100644 (file)
@@ -1266,8 +1266,8 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
         fclose(handle);
     }
     data->state.cookie_engine = TRUE;
-    c->running = TRUE;          /* now, we're running */
   }
+  c->running = TRUE;          /* now, we're running */
 
   return c;