From 8844288c4e0c67cf7e765a92aafe62f76e3e86b1 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Mon, 13 Jan 2014 18:47:18 +0000 Subject: 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 Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15107 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ShellProtocol.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ShellPkg/Application/Shell') 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); } -- cgit v1.2.3