FwVolHeader must be deallocated on error path.

Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com>
---
 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 153bfecafa77..0c1554ba4d63 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;
       }
 
-- 
2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108221): https://edk2.groups.io/g/devel/message/108221
Mute This Topic: https://groups.io/mt/101085563/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to