diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-06-30 08:11:32 +0300 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-07-25 15:59:44 +0300 |
commit | df76431b11396b940b5aa9b25edd5b0a33b18911 (patch) | |
tree | 2bc132ce33efba713a43e00bbc48c35d7d3d52c5 /lib | |
parent | 1bfb1579be510ebad9656eb68fac48f1086431e7 (diff) | |
download | u-boot-df76431b11396b940b5aa9b25edd5b0a33b18911.tar.xz |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_driver/efi_block_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index 9c807ff71d..5b9c139f38 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -161,6 +161,8 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) return ret; if (!bdev) return -ENOENT; + /* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */ + device_set_name_alloced(bdev); /* Allocate priv */ ret = device_probe(bdev); if (ret) |