mirror of https://github.com/acidanthera/audk.git
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:
parent
0bcc503595
commit
f18ec60fa4
|
@ -659,6 +659,7 @@ NotifyFwVolBlock (
|
|||
//
|
||||
FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
|
||||
if (FvDevice == NULL) {
|
||||
CoreFreePool (FwVolHeader);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue