diff options
author | Tian Feng <feng.tian@intel.com> | 2015-11-24 14:35:28 +0800 |
---|---|---|
committer | Feng Tian <feng.tian@intel.com> | 2016-04-26 15:44:54 +0800 |
commit | ac231001f5c08356b236dc96aacb3015720cddf0 (patch) | |
tree | fd4472ac7a1a1c53ad707f234803610808aed4f6 /MdeModulePkg/Bus/Pci | |
parent | bd2388ab12984e0185d0c0c91729f2afdf631467 (diff) | |
download | edk2-platforms-ac231001f5c08356b236dc96aacb3015720cddf0.tar.xz |
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>
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c index c379e178e1..54d637e7d0 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c @@ -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);
}
|