diff options
author | Jaben Carsey <jaben.carsey@intel.com> | 2014-01-13 18:47:18 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-13 18:47:18 +0000 |
commit | 8844288c4e0c67cf7e765a92aafe62f76e3e86b1 (patch) | |
tree | 83511d9be5c80b7212ed63d50d591c5859b15d14 /ShellPkg/Application | |
parent | b00c06f018bb86bec276dcd8e3038e0a06221b09 (diff) | |
download | edk2-platforms-8844288c4e0c67cf7e765a92aafe62f76e3e86b1.tar.xz |
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/Application')
-rw-r--r-- | ShellPkg/Application/Shell/ShellProtocol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index b67aefb71c..c619ba15a1 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);
}
|