mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-30 16:35:37 +00:00
efi_driver: set DM_FLAG_NAME_ALLOCED flag
Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak when the block device is removed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
1bfb1579be
commit
df76431b11
1 changed files with 2 additions and 0 deletions
|
@ -161,6 +161,8 @@ static int efi_bl_bind(efi_handle_t handle, void *interface)
|
||||||
return ret;
|
return ret;
|
||||||
if (!bdev)
|
if (!bdev)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
/* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */
|
||||||
|
device_set_name_alloced(bdev);
|
||||||
/* Allocate priv */
|
/* Allocate priv */
|
||||||
ret = device_probe(bdev);
|
ret = device_probe(bdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue