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 {