/* This code cleans up enrolled file by closing file & free related resources attached to enrolled file. */
VOID CloseEnrolledFile(IN SECUREBOOT_FILE_CONTEXT *FileContext)
/* This code cleans up enrolled file by closing file & free related resources attached to enrolled file. */
VOID CloseEnrolledFile(IN SECUREBOOT_FILE_CONTEXT *FileContext)
{
  if (FileContext->FHandle != NULL) {
    CloseFile (FileContext->FHandle);
    FileContext->FHandle = NULL;
  }
  if (FileContext->FileName != NULL) {
    FreePool (FileContext->FileName);
    FileContext->FileName = NULL;
  }
  FileContext->FileType = UNKNOWN_FILE_TYPE;
}