summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-04-16 09:31:01 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-04-16 09:31:01 +0000
commit0aa39d284043be61b5f1222afdffd39a5abaf3aa (patch)
treec9f4e5ef77df35c70b51f8a08db19b98454b5b4c
parent8ecb9d1beee525d804cff388117e5243347a8791 (diff)
downloadedk2-platforms-0aa39d284043be61b5f1222afdffd39a5abaf3aa.tar.xz
ArmPlatformPkg/Bds: Do not free NULL pointer
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15473 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ArmPlatformPkg/Bds/Bds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index d2b62252ed..ebad6feda7 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -337,7 +337,7 @@ DefineDefaultBootEntries (
if (DefaultBootArgument == (CHAR16*)PcdGetPtr (PcdDefaultBootArgument)) {
FreePool (AsciiDefaultBootArgument);
- } else {
+ } else if (DefaultBootArgument != NULL) {
FreePool (DefaultBootArgument);
}
} else {