X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FApplication%2FCapsuleApp%2FCapsuleDump.c;h=6c1320942bf423929e5cc6c67c9f66d12e5e8639;hp=2bb5f1f02cf427888055b285afe84c38709f67b5;hb=2e3032b4aae427fded0d7b4e5fefcd13f6576bbc;hpb=de5209d5db0b96c2a2c1572838e5fc1301f95aa9 diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 2bb5f1f02c..6c1320942b 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -1,7 +1,7 @@ /** @file Dump Capsule image information. - Copyright (c) 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2018, 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 @@ -242,6 +242,7 @@ DumpCapsule ( EFI_CAPSULE_HEADER *CapsuleHeader; EFI_STATUS Status; + Buffer = NULL; Status = ReadFileToBuffer(CapsuleName, &FileSize, &Buffer); if (EFI_ERROR(Status)) { Print(L"CapsuleApp: Capsule (%s) is not found.\n", CapsuleName); @@ -269,7 +270,9 @@ DumpCapsule ( } Done: - FreePool(Buffer); + if (Buffer != NULL) { + FreePool(Buffer); + } return Status; }