]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/NvmExpressDxe: Memory leak fix in async code flow
authorSuman Prakash <suman.p@samsung.com>
Mon, 20 Mar 2017 08:34:55 +0000 (16:34 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 21 Mar 2017 02:01:44 +0000 (10:01 +0800)
commitf2333c707dd04f069c102bcae004561ec590a3a0
tree6d241870cf648288f0cfe50a1589eb7c797d4ce1
parent38b15ebe4fd5888493131d30fc31833a5e9a7d36
MdeModulePkg/NvmExpressDxe: Memory leak fix in async code flow

For async commands, the buffer allocated for Prp list is
not getting freed, which will cause memory leak for async
read write command. For example testing async command flow
with custom application to send multiple read write commands
were resulting in decrease of available memory page in memmap,
which eventually resulted in system hang. Hence freeing
AsyncRequest->MapData, AsyncRequest->MapMeta, AsyncRequest->MapPrpList and
AsyncRequest->PrpListHost when async command is completed.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Suman Prakash <suman.p@samsung.com.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c