summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2014-01-13 18:47:18 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-01-13 18:47:18 +0000
commit8844288c4e0c67cf7e765a92aafe62f76e3e86b1 (patch)
tree83511d9be5c80b7212ed63d50d591c5859b15d14 /ShellPkg
parentb00c06f018bb86bec276dcd8e3038e0a06221b09 (diff)
downloadedk2-8844288c4e0c67cf7e765a92aafe62f76e3e86b1.zip
edk2-8844288c4e0c67cf7e765a92aafe62f76e3e86b1.tar.gz
edk2-8844288c4e0c67cf7e765a92aafe62f76e3e86b1.tar.bz2
ShellPkg: assign pointer to NULL after free to prevent double free
Since the API caller may call twice we need to make sure that we set pointer to NULL so we can tell if already free. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15107 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index b67aefb..c619ba1 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -1620,6 +1620,7 @@ EfiShellFreeFileList(
InternalFreeShellFileInfoNode(ShellFileListItem);
}
InternalFreeShellFileInfoNode(*FileList);
+ *FileList = NULL;
return(EFI_SUCCESS);
}