]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hsts: Remove pointless call to free in errorpath
authorDaniel Gustafsson <daniel@yesql.se>
Thu, 5 Nov 2020 08:42:38 +0000 (09:42 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 5 Nov 2020 08:42:38 +0000 (09:42 +0100)
The line variable will always be NULL in the error path, so remove
the free call since it's pointless.

Closes #6170
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/hsts.c

index f828077c7da51d9cadae3a713712df1254ced496..866f3e9ffd4a9a2c6e8475170789d703efad72a0 100644 (file)
@@ -498,7 +498,6 @@ static CURLcode hsts_load(struct hsts *h, const char *file)
 
   fail:
   Curl_safefree(h->filename);
-  free(line);
   fclose(fp);
   return CURLE_OUT_OF_MEMORY;
 }