mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-02 15:38:52 +00:00
fallback: fix double free of dp
If the boot option recorded in csv is not in a media device path, the corresponding full device path will be referred for creating the boot variable. However, the current code logic always frees the full device path (full_device_path) and the media device path (dp) separately. In order to resolve this issue, always check whether dp equals to full_device_path before freeing dp. Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
This commit is contained in:
parent
631265b7e9
commit
e6f3a6ecc3
@ -482,7 +482,7 @@ add_to_boot_list(CHAR16 *dirname, CHAR16 *filename, CHAR16 *label, CHAR16 *argum
|
||||
err:
|
||||
if (full_device_path)
|
||||
FreePool(full_device_path);
|
||||
if (dp)
|
||||
if (dp && dp != full_device_path)
|
||||
FreePool(dp);
|
||||
if (fullpath)
|
||||
FreePool(fullpath);
|
||||
|
Loading…
Reference in New Issue
Block a user