OvmfPkg/VirtioFsDxe: manage path lifecycle in OpenVolume, Close, Delete

Add a canonical pathname field to VIRTIO_FS_FILE.

Initialize the new field in EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.OpenVolume().

Release the new field in EFI_FILE_PROTOCOL.Close() and
EFI_FILE_PROTOCOL.Delete().

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-18-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
This commit is contained in:
Laszlo Ersek
2020-12-16 22:10:54 +01:00
committed by mergify[bot]
parent 9307d7c7a4
commit 7e8c83f7d4
4 changed files with 15 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ VirtioFsSimpleFileClose (
//
RemoveEntryList (&VirtioFsFile->OpenFilesEntry);
FreePool (VirtioFsFile->CanonicalPathname);
FreePool (VirtioFsFile);
return EFI_SUCCESS;
}