]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootConfig.c
NetworkPkg: Fix a memory leak in HTTP boot driver.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootConfig.c
index 2ca38b533329b65057518f4224348c2a5f2bfa7e..04c2f3efd72da026d23d2bd8e7ce5d3a25ba09bb 100644 (file)
@@ -142,9 +142,7 @@ HttpBootAddBootOption (
   }\r
 \r
   Status = EfiBootManagerAddLoadOptionVariable (&NewOption, (UINTN) -1);\r
-  if (EFI_ERROR (Status)) {\r
-    EfiBootManagerFreeLoadOption (&NewOption);\r
-  }\r
+  EfiBootManagerFreeLoadOption (&NewOption);\r
 \r
 ON_EXIT:\r
 \r