/* Free the resource related to the configure parameters. DHCP driver will make a copy of the user's configure such as the time out value. */
VOID DhcpCleanConfigure(IN OUT EFI_DHCP4_CONFIG_DATA *Config)
/* Free the resource related to the configure parameters. DHCP driver will make a copy of the user's configure such as the time out value. */
VOID DhcpCleanConfigure(IN OUT EFI_DHCP4_CONFIG_DATA *Config)
{
  UINT32  Index;
  if (Config->DiscoverTimeout != NULL) {
    FreePool (Config->DiscoverTimeout);
  }
  if (Config->RequestTimeout != NULL) {
    FreePool (Config->RequestTimeout);
  }
  if (Config->OptionList != NULL) {
    for (Index = 0; Index < Config->OptionCount; Index++) {
      if (Config->OptionList[Index] != NULL) {
        FreePool (Config->OptionList[Index]);
      }
    }
    FreePool (Config->OptionList);
  }
  ZeroMem (Config, sizeof (EFI_DHCP4_CONFIG_DATA));
}