From 7d745e49c02146bae75027d53f24c04175f6e848 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Fri, 30 Jun 2017 15:50:24 +0800 Subject: 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(-) (limited to 'httpboot.c') 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) { -- cgit v1.2.3