diff --git a/src/main.c b/src/main.c index 64907119..9e52bcdb 100644 --- a/src/main.c +++ b/src/main.c @@ -156,7 +156,11 @@ get_hsts_database (void) home = home_dir (); if (home) - return aprintf ("%s/.wget-hsts", home); + { + char *dir = aprintf ("%s/.wget-hsts", home); + xfree(home); + return dir; + } return NULL; } @@ -1763,8 +1767,6 @@ outputting to a regular file.\n")); #endif #ifdef HAVE_HSTS - hsts_store = NULL; - /* Load the HSTS database. Maybe all the URLs are FTP(S), in which case HSTS would not be needed, but this is the best place to do it, and it shouldn't be a critical