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:
Jaben Carsey 2014-01-13 18:47:18 +00:00 committed by jcarsey
parent b00c06f018
commit 8844288c4e
1 changed files with 1 additions and 0 deletions

View File

@ -1620,6 +1620,7 @@ EfiShellFreeFileList(
InternalFreeShellFileInfoNode(ShellFileListItem);
}
InternalFreeShellFileInfoNode(*FileList);
*FileList = NULL;
return(EFI_SUCCESS);
}