diff options
author | Li Nan <linan122@huawei.com> | 2023-12-08 08:46:29 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2024-01-06 23:52:51 +0100 |
commit | adbf4c4954e33e623897058a617c583d65a177f6 (patch) | |
tree | 93cb40f4ea85601e4b8246bd19f7d51b20f5c13e /certs | |
parent | ubifs: fix kernel-doc warnings (diff) | |
download | linux-adbf4c4954e33e623897058a617c583d65a177f6.tar.xz linux-adbf4c4954e33e623897058a617c583d65a177f6.zip |
ubi: block: fix memleak in ubiblock_create()
If idr_alloc() fails, dev->gd will be put after goto out_cleanup_disk in
ubiblock_create(), but dev->gd has not been assigned yet at this time, and
'gd' will not be put anymore. Fix it by putting 'gd' directly.
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions