From abeca79abfab3fbfd7b06075e06a2ea08114c8a6 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Thu, 12 Aug 2010 17:21:22 +0000 Subject: [PATCH] Fix bug in LoadFv command. Don't free the buffer the file was loaded into as the DXE Core will point to it as an FV. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10791 6f19259b-4bc3-4df7-8a09-765794883524 --- EmbeddedPkg/Ebl/EfiDevice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Ebl/EfiDevice.c b/EmbeddedPkg/Ebl/EfiDevice.c index 2f9a606726..dafe0c9a05 100644 --- a/EmbeddedPkg/Ebl/EfiDevice.c +++ b/EmbeddedPkg/Ebl/EfiDevice.c @@ -403,7 +403,9 @@ EblLoadFvCmd ( } Status = gDS->ProcessFirmwareVolume (FvStart, FvSize, &FvHandle); - FreePool (FvStart); + if (EFI_ERROR (Status)) { + FreePool (FvStart); + } } return Status; } -- 2.39.2