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>
This commit is contained in:
Heinrich Schuchardt 2024-04-26 16:13:08 +02:00
parent b319356238
commit 8745f13fe1
3 changed files with 4 additions and 4 deletions

View file

@ -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);