From f18ec60fa4e140fca22714632764d56b8d511fc8 Mon Sep 17 00:00:00 2001 From: Mike Maslenkin Date: Thu, 31 Aug 2023 17:10:31 -0700 Subject: [PATCH] MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c FwVolHeader must be freed on error path. Cc: Jian J Wang Cc: Dandan Bi Cc: Liming Gao Signed-off-by: Mike Maslenkin Reviewed-by: Michael D Kinney Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 153bfecafa..0c1554ba4d 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -659,6 +659,7 @@ NotifyFwVolBlock ( // FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice); if (FvDevice == NULL) { + CoreFreePool (FwVolHeader); return; }