mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
b00c06f018
commit
8844288c4e
|
@ -1620,6 +1620,7 @@ EfiShellFreeFileList(
|
|||
InternalFreeShellFileInfoNode(ShellFileListItem);
|
||||
}
|
||||
InternalFreeShellFileInfoNode(*FileList);
|
||||
*FileList = NULL;
|
||||
return(EFI_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue