1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix leak in HSTS code

* src/hsts.c (hsts_store_open): close fp if open.
This commit is contained in:
Ander Juaristi 2015-12-13 16:10:16 +01:00 committed by Tim Rühsen
parent 994c4dcce7
commit 478a584609

View File

@ -485,10 +485,12 @@ hsts_store_open (const char *filename)
if (fstat (fileno (fp), &st) == 0)
store->last_mtime = st.st_mtime;
fclose (fp);
}
out:
if (fp)
fclose (fp);
return store;
}