summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Ebl
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-12 17:21:22 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-12 17:21:22 +0000
commitabeca79abfab3fbfd7b06075e06a2ea08114c8a6 (patch)
treee35b10825bc1a5e8f16d401096ea376b21ac2efb /EmbeddedPkg/Ebl
parentae0a0b06af78f698df71b18a1defb5aece2f21b4 (diff)
downloadedk2-platforms-abeca79abfab3fbfd7b06075e06a2ea08114c8a6.tar.xz
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
Diffstat (limited to 'EmbeddedPkg/Ebl')
-rw-r--r--EmbeddedPkg/Ebl/EfiDevice.c4
1 files changed, 3 insertions, 1 deletions
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;
}