From 7d745e49c02146bae75027d53f24c04175f6e848 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Fri, 30 Jun 2017 15:50:24 +0800 Subject: [PATCH] httpboot: fix OVMF crash This is a typical typo. The free operation should be done if uri was allocated. Signed-off-by: Lans Zhang --- httpboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httpboot.c b/httpboot.c index f8fbc73..e4657c1 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) {