]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookie: fix false positive "potentially uninitialized local variable"
authorDaniel Stenberg <daniel@haxx.se>
Tue, 24 May 2022 08:57:32 +0000 (10:57 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 24 May 2022 10:16:08 +0000 (12:16 +0200)
Reviewed-by: Daniel Gustafsson
Closes #8903

lib/cookie.c

index ac53d278481b2d662df7ce20341863bb22f3cc40..28961720fbcd650644dc114d4dac1550f576d686 100644 (file)
@@ -469,7 +469,7 @@ Curl_cookie_add(struct Curl_easy *data,
   struct Cookie *co;
   struct Cookie *lastc = NULL;
   struct Cookie *replace_co = NULL;
-  struct Cookie *replace_clist;
+  struct Cookie *replace_clist = NULL;
   time_t now = time(NULL);
   bool replace_old = FALSE;
   bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */