This library class defines a set of interfaces to customize Ui module\r
\r
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#include <Uefi.h>\r
\r
Count++;\r
if (Count >= CurrentSize) {\r
- DriverListPtr = AllocateCopyPool ((Count + UI_HII_DRIVER_LIST_SIZE) * sizeof (UI_HII_DRIVER_INSTANCE), gHiiDriverList);\r
+ DriverListPtr = ReallocatePool (\r
+ CurrentSize * sizeof (UI_HII_DRIVER_INSTANCE),\r
+ (Count + UI_HII_DRIVER_LIST_SIZE)\r
+ * sizeof (UI_HII_DRIVER_INSTANCE),\r
+ gHiiDriverList\r
+ );\r
ASSERT (DriverListPtr != NULL);\r
- FreePool (gHiiDriverList);\r
gHiiDriverList = DriverListPtr;\r
CurrentSize += UI_HII_DRIVER_LIST_SIZE;\r
}\r