]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: FileExplorerLib: prevent freeing null pointer
authorMichael Zimmermann <sigmaepsilon92@gmail.com>
Mon, 9 May 2016 02:01:49 +0000 (10:01 +0800)
committerFeng Tian <feng.tian@intel.com>
Mon, 9 May 2016 08:18:00 +0000 (16:18 +0800)
when there's no volume label 'Info' can be NULL

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Library/FileExplorerLib/FileExplorer.c

index 9f75d6ede544080eec8fc8a8ad602ab6d56b8519..59c851b7b3b5c381b555b2296c87688148f28c05 100644 (file)
@@ -775,7 +775,9 @@ LibFindFileSystem (
                                              MenuEntry->DisplayString,\r
                                              NULL\r
                                              );\r
-      FreePool (Info);\r
+\r
+      if (Info != NULL)\r
+        FreePool (Info);\r
 \r
       OptionNumber++;\r
       InsertTailList (&gFileExplorerPrivate.FsOptionMenu->Head, &MenuEntry->Link);\r