]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix bug in LoadFv command. Don't free the buffer the file was loaded into as the...
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Aug 2010 17:21:22 +0000 (17:21 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 12 Aug 2010 17:21:22 +0000 (17:21 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10791 6f19259b-4bc3-4df7-8a09-765794883524

EmbeddedPkg/Ebl/EfiDevice.c

index 2f9a6067267cc4e950000d17ac53bd1f2444f589..dafe0c9a05935b1a4eedfd0039e00e2bd0645e36 100644 (file)
@@ -403,7 +403,9 @@ EblLoadFvCmd (
     }\r
       \r
     Status = gDS->ProcessFirmwareVolume (FvStart, FvSize, &FvHandle);\r
-    FreePool (FvStart);\r
+    if (EFI_ERROR (Status)) {\r
+      FreePool (FvStart);\r
+    } \r
   }\r
   return Status;\r
 }\r