mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/NvmExpress: Fix mem leak in error handling of Start()
Memory pointed to by Private->ControllerData has not been freed up correctly at error handling path. Cc: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com>
This commit is contained in:
parent
bd2388ab12
commit
ac231001f5
|
@ -847,6 +847,10 @@ Exit:
|
|||
PciIo->FreeBuffer (PciIo, 4, Private->Buffer);
|
||||
}
|
||||
|
||||
if ((Private != NULL) && (Private->ControllerData != NULL)) {
|
||||
FreePool (Private->ControllerData);
|
||||
}
|
||||
|
||||
if (Private != NULL) {
|
||||
FreePool (Private);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue