mirror of
https://xff.cz/git/u-boot/
synced 2025-10-20 01:14:39 +02:00
efi_loader: efi_dp_part_node check dp_alloc return value
dp_alloc() may return NULL. This needs to be caught.
Fixes: 98d48bdf41
("efi_loader: provide a function to create a partition node")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
@@ -936,7 +936,8 @@ struct efi_device_path *efi_dp_part_node(struct blk_desc *desc, int part)
|
||||
dpsize = sizeof(struct efi_device_path_hard_drive_path);
|
||||
buf = dp_alloc(dpsize);
|
||||
|
||||
dp_part_node(buf, desc, part);
|
||||
if (buf)
|
||||
dp_part_node(buf, desc, part);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user