diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-26 16:13:08 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-05-01 08:40:42 +0200 |
commit | 8745f13fe102968f58a9e2e5f69ad153a675b59c (patch) | |
tree | cd5b5ae2fd542e757e052f7beb6407bbf07ed8b5 /lib/efi_loader/efi_helper.c | |
parent | b3193562388a36e0098501887adda9771cd43db6 (diff) |
efi_loader: pass GUID by address to efi_dp_from_lo
We should not pass GUIDs by value as this requires copying.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_helper.c')
-rw-r--r-- | lib/efi_loader/efi_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 9d7f82f4522..73d0279e843 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -72,7 +72,7 @@ out: * * Return: device path or NULL. Caller must free the returned value */ -struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid) +struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid) { struct efi_load_option lo; void *var_value; @@ -92,7 +92,7 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid) if (ret != EFI_SUCCESS) goto err; - return efi_dp_from_lo(&lo, &guid); + return efi_dp_from_lo(&lo, guid); err: free(var_value); |