/** @file\r
Implementation for EFI_HII_DATABASE_PROTOCOL.\r
\r
-Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
if (gRTConfigRespBuffer == NULL){\r
FreePool(ConfigAltResp);\r
DEBUG ((DEBUG_ERROR, "[HiiDatabase]: No enough memory resource to store the ConfigResp string.\n"));\r
+ //\r
+ // Remove from the System Table when the configuration runtime buffer is freed.\r
+ //\r
+ gBS->InstallConfigurationTable (&gEfiHiiConfigRoutingProtocolGuid, NULL);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
} else {\r
gRTDatabaseInfoBuffer = AllocateRuntimeZeroPool (gDatabaseInfoSize);\r
if (gRTDatabaseInfoBuffer == NULL){\r
DEBUG ((DEBUG_ERROR, "[HiiDatabase]: No enough memory resource to store the HiiDatabase info.\n"));\r
+ //\r
+ // Remove from the System Table when the configuration runtime buffer is freed.\r
+ //\r
+ gBS->InstallConfigurationTable (&gEfiHiiDatabaseProtocolGuid, NULL);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
} else {\r