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>
This commit is contained in:
Lans Zhang 2017-06-30 15:50:24 +08:00 committed by Peter Jones
parent 919c17a45f
commit 7d745e49c0

View File

@ -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) {