summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53c1329)
raw | patch | inline | side by side (parent: 53c1329)
author | Qiu Shumin <shumin.qiu@intel.com> | |
Fri, 11 Mar 2016 05:32:52 +0000 (13:32 +0800) | ||
committer | Qiu Shumin <shumin.qiu@intel.com> | |
Mon, 14 Mar 2016 08:24:46 +0000 (16:24 +0800) |
Free 'FoundFileList' when read 'TAB' key fail to avoid memory leak and ASSERT.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
ShellPkg/Application/Shell/FileHandleWrappers.c | patch | blob | history |
diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c
index 1a0c9992abefea128c6e101f97bed547ecfce46b..0e5efe30255631f36b972715c49a464970f88677 100644 (file)
TabLinePos = (EFI_SHELL_FILE_INFO*)GetFirstNode(&FoundFileList->Link);\r
InTabScrolling = TRUE;\r
} else {\r
- FreePool(FoundFileList);\r
- FoundFileList = NULL;\r
+ ShellInfoObject.NewEfiShellProtocol->FreeFileList (&FoundFileList);\r
}\r
}\r
}\r
// if this was used it should be deallocated by now...\r
// prevent memory leaks...\r
//\r
+ if (FoundFileList != NULL) {\r
+ ShellInfoObject.NewEfiShellProtocol->FreeFileList (&FoundFileList);\r
+ }\r
ASSERT(FoundFileList == NULL);\r
\r
return Status;\r