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