/* If UnicodeStringTable is NULL, then EFI_SUCCESS is returned. Otherwise, each language code, and each Unicode string in the Unicode string table are freed, and EFI_SUCCESS is returned. */
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
/* If UnicodeStringTable is NULL, then EFI_SUCCESS is returned. Otherwise, each language code, and each Unicode string in the Unicode string table are freed, and EFI_SUCCESS is returned. */
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
{
  UINTN  Index;
  if (UnicodeStringTable == NULL) {
    return EFI_SUCCESS;
  }
  for (Index = 0; UnicodeStringTable[Index].Language != NULL; Index++) {
    FreePool (UnicodeStringTable[Index].Language);
    if (UnicodeStringTable[Index].UnicodeString != NULL) {
      FreePool (UnicodeStringTable[Index].UnicodeString);
    }
  }
  FreePool (UnicodeStringTable);
  return EFI_SUCCESS;
}