mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
hpm: Fix resource leak
fclose(pImageFile) was missing before returning from HpmfwupgGetBufferFromFile()
This commit is contained in:
parent
0ca9c66b84
commit
272d9d0d9b
@ -1398,6 +1398,7 @@ HpmfwupgGetBufferFromFile(char *imageFilename,
|
||||
if (ret != 0) {
|
||||
lprintf(LOG_ERR, "Failed to seek in the image file '%s'",
|
||||
imageFilename);
|
||||
fclose(pImageFile);
|
||||
return HPMFWUPG_ERROR;
|
||||
}
|
||||
pFwupgCtx->imageSize = ftell(pImageFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user