summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-06-30 15:50:24 +0800
committerPeter Jones <pjones@redhat.com>2017-07-17 13:13:00 -0400
commit7d745e49c02146bae75027d53f24c04175f6e848 (patch)
tree016df1baef910c7ab0d05ea537bad55445a9828d
parent919c17a45fe722dcc2b9bdaba538c738f97f88cd (diff)
downloadefi-boot-shim-7d745e49c02146bae75027d53f24c04175f6e848.tar.gz
efi-boot-shim-7d745e49c02146bae75027d53f24c04175f6e848.zip
httpboot: fix OVMF crash
This is a typical typo. The free operation should be done if uri was allocated. Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--httpboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/httpboot.c b/httpboot.c
index f8fbc735..e4657c12 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -110,8 +110,10 @@ find_httpboot (EFI_HANDLE device)
URI_DEVICE_PATH *UriNode;
UINTN uri_size;
- if (!uri)
+ if (uri) {
FreePool(uri);
+ uri = NULL;
+ }
devpath = DevicePathFromHandle(device);
if (!devpath) {