MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c
FwVolHeader must be freed on error path. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
0bcc503595
commit
f18ec60fa4
@ -659,6 +659,7 @@ NotifyFwVolBlock (
|
|||||||
//
|
//
|
||||||
FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
|
FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
|
||||||
if (FvDevice == NULL) {
|
if (FvDevice == NULL) {
|
||||||
|
CoreFreePool (FwVolHeader);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user