diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-03-27 17:27:24 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-03-27 17:27:24 +0000 |
commit | 3a2b37f0d4d489322499110b44b6f74bbe7329d6 (patch) | |
tree | 83af38bd2095ced628e6320bccad541131c8f000 /ArmPlatformPkg/Bds | |
parent | 55f5af1871d07d62def7bafa20b4761cc8b66e7d (diff) | |
download | edk2-3a2b37f0d4d489322499110b44b6f74bbe7329d6.tar.gz edk2-3a2b37f0d4d489322499110b44b6f74bbe7329d6.tar.bz2 edk2-3a2b37f0d4d489322499110b44b6f74bbe7329d6.zip |
ArmPlatformPkg: fix two instances of FreePool () on NULL value
This is a copy/paste of the exact same code in both cases: Buffer
should only be freed on the success path, otherwise it will be
NULL
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17078 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 971ab07524..6a12717a1c 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -155,8 +155,8 @@ InitializeConsolePipe ( *Handle = Buffer[0];
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
ASSERT_EFI_ERROR(Status);
+ FreePool (Buffer);
}
- FreePool (Buffer);
} else {
Status = EFI_SUCCESS;
}
|