Bug 1021142 - 'fclose()' at 2 places to avoid leaks on failure. r=bbondy

This commit is contained in:
Shashank Sabniveesu 2014-08-28 11:35:50 -07:00
parent 36bed62589
commit 903c685d53

View File

@ -236,6 +236,7 @@ refresh_product_info_block(const char *path,
if (fread(&additionalBlockSize,
sizeof(additionalBlockSize),
1, fp) != 1) {
fclose(fp);
return -1;
}
additionalBlockSize = ntohl(additionalBlockSize);
@ -244,6 +245,7 @@ refresh_product_info_block(const char *path,
if (fread(&additionalBlockID,
sizeof(additionalBlockID),
1, fp) != 1) {
fclose(fp);
return -1;
}
additionalBlockID = ntohl(additionalBlockID);