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 <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
2074f70064
commit
04298686a4
@@ -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) && \
|
||||
|
||||
Reference in New Issue
Block a user