diff options
author | Josef Moellers <jmoellers@suse.de> | 2019-01-24 09:16:49 +0100 |
---|---|---|
committer | Alexander Amelkin <mocbuhtig@amelkin.msk.ru> | 2019-01-24 15:22:21 +0300 |
commit | 272d9d0d9b29f41b6b10a870d856fec8d19233e2 (patch) | |
tree | c7c2977d838543c480e480297b897de06d60ceb4 /lib/ipmi_hpmfwupg.c | |
parent | 0ca9c66b84a9e20a941d44314070601d7fe16aa6 (diff) | |
download | ipmitool-272d9d0d9b29f41b6b10a870d856fec8d19233e2.tar.gz |
hpm: Fix resource leak
fclose(pImageFile) was missing before returning from
HpmfwupgGetBufferFromFile()
Diffstat (limited to 'lib/ipmi_hpmfwupg.c')
-rw-r--r-- | lib/ipmi_hpmfwupg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index ac1d90f..4783eec 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -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); |