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 | |
parent | 55f5af1871d07d62def7bafa20b4761cc8b66e7d (diff) | |
download | edk2-platforms-3a2b37f0d4d489322499110b44b6f74bbe7329d6.tar.xz |
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
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 2 | ||||
-rw-r--r-- | ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 2 |
2 files changed, 2 insertions, 2 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;
}
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c index c07fc0f607..c82f27fb4e 100644 --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c @@ -179,8 +179,8 @@ InitializeConsolePipe ( *Handle = Buffer[0];
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
ASSERT_EFI_ERROR (Status);
+ FreePool (Buffer);
}
- FreePool (Buffer);
} else {
Status = EFI_SUCCESS;
}
|