/* Base on the current formset info, clean the ConfigRequest string in browser storage. */
VOID CleanBrowserStorage(IN OUT FORM_BROWSER_FORMSET *FormSet)
/* Base on the current formset info, clean the ConfigRequest string in browser storage. */
VOID CleanBrowserStorage(IN OUT FORM_BROWSER_FORMSET *FormSet)
{
  LIST_ENTRY       *Link;
  FORMSET_STORAGE  *Storage;
  Link = GetFirstNode (&FormSet->StorageListHead);
  while (!IsNull (&FormSet->StorageListHead, Link)) {
    Storage = FORMSET_STORAGE_FROM_LINK (Link);
    Link    = GetNextNode (&FormSet->StorageListHead, Link);
    if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
      if ((Storage->ConfigRequest == NULL) || (Storage->BrowserStorage->ConfigRequest == NULL)) {
        continue;
      }
      RemoveConfigRequest (Storage, Storage->ConfigRequest);
    } else if ((Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER) ||
               (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE))
    {
      if (Storage->BrowserStorage->ConfigRequest != NULL) {
        FreePool (Storage->BrowserStorage->ConfigRequest);
        Storage->BrowserStorage->ConfigRequest = NULL;
      }
      Storage->BrowserStorage->Initialized = FALSE;
    }
  }
}