From 04298686a43af15c091393fac71fc42e73efddbd Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Jan 2018 20:24:37 +0100 Subject: efi_loader: return NULL from device path functions For the construction of device paths we need to call the AllocatePool service. We should not ignore if it fails due to an out of memory situation. This patch changes the device path functions to return NULL if the memory allocation fails. Additional patches will be needed to fix the callers. Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- include/efi_loader.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/efi_loader.h') diff --git a/include/efi_loader.h b/include/efi_loader.h index 37389c33cc..6b623d8327 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -304,9 +304,9 @@ struct efi_device_path *efi_dp_from_eth(void); struct efi_device_path *efi_dp_from_mem(uint32_t mem_type, uint64_t start_address, uint64_t end_address); -void efi_dp_split_file_path(struct efi_device_path *full_path, - struct efi_device_path **device_path, - struct efi_device_path **file_path); +efi_status_t efi_dp_split_file_path(struct efi_device_path *full_path, + struct efi_device_path **device_path, + struct efi_device_path **file_path); #define EFI_DP_TYPE(_dp, _type, _subtype) \ (((_dp)->type == DEVICE_PATH_TYPE_##_type) && \ -- cgit