X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FHexEdit%2FDiskImage.c;h=86db6aadf25edebcac67209b85ac3be749b16d15;hp=140db71671247678478d3dfa7747152b3763e5df;hb=980d554e3ab6457a4f7a455fabcc297d6e93547f;hpb=64d753f12d74b683b52862b7a4403fa2cd56a171 diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c index 140db71671..86db6aadf2 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c @@ -219,6 +219,7 @@ Returns: { CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath; EFI_DEVICE_PATH_PROTOCOL *DupDevicePath; + EFI_DEVICE_PATH_PROTOCOL *DupDevicePathForFree; EFI_HANDLE Handle; EFI_BLOCK_IO_PROTOCOL *BlkIo; EFI_STATUS Status; @@ -241,11 +242,12 @@ Returns: 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;