X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FHexEdit%2FDiskImage.c;fp=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FHexEdit%2FDiskImage.c;h=1c93cd8958412fddd6db76dae63cb3c84f3592bb;hb=c0b7e2b2bfc2748112607bfe83fc99cf48c97b48;hp=a50b52f5f207b68d51dc7cbf2a0aeb0683ee0ded;hpb=8550b5f0810f306850f9a07ee551099155d89ae0;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c index a50b52f5f2..1c93cd8958 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c @@ -1,7 +1,7 @@ /** @file Functions to deal with Disk buffer. - Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -343,6 +343,7 @@ HDiskImageSave ( CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath; EFI_DEVICE_PATH_PROTOCOL *DupDevicePath; + EFI_DEVICE_PATH_PROTOCOL *DupDevicePathForFree; EFI_BLOCK_IO_PROTOCOL *BlkIo; EFI_STATUS Status; EFI_HANDLE Handle; @@ -364,12 +365,13 @@ HDiskImageSave ( return EFI_INVALID_PARAMETER; } DupDevicePath = DuplicateDevicePath(DevicePath); + DupDevicePathForFree = DupDevicePath; // // get blkio interface // Status = gBS->LocateDevicePath(&gEfiBlockIoProtocolGuid,&DupDevicePath,&Handle); - FreePool(DupDevicePath); + FreePool(DupDevicePathForFree); if (EFI_ERROR (Status)) { // StatusBarSetStatusString (L"Read Disk Failed"); return Status;