]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
Parameter checking in BdsLibMatchDevicePaths() is wrong. This bug was found because...
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / BdsMisc.c
index 3136341162cd74ae81edb1e24a055c5d5d409334..8b3dcd783b8d60b63124719d7c859a69dea8c93d 100644 (file)
@@ -305,9 +305,7 @@ BdsLibRegisterNewOption (
         // Got the option, so just return\r
         //\r
         FreePool (OptionPtr);\r
-        if (TempOptionPtr != NULL) {\r
-          FreePool (TempOptionPtr);\r
-        }\r
+        FreePool (TempOptionPtr);\r
         return EFI_SUCCESS;\r
       } else {\r
         //\r
@@ -762,7 +760,7 @@ BdsLibMatchDevicePaths (
   EFI_DEVICE_PATH_PROTOCOL  *DevicePathInst;\r
   UINTN                     Size;\r
 \r
-  if (Multi != NULL || Single  != NULL) {\r
+  if (Multi == NULL || Single  == NULL) {\r
     return FALSE;\r
   }\r
 \r