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
1 changed files with 3 additions and 1 deletions

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;
}