mtd/ubi/block: Fix null pointer dereference issue in error path
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I81XCK ---------------------------------------- When idr_alloc fails and goes the out_cleanup_disk error path, we get a null pointer dereference problem because dev->gd has not been assigned a value at this time. Fix this problem by changing dev->gd to gd. Fixes: 2bf50d42 ("UBI: block: Dynamically allocate minor numbers") Signed-off-by:Zhong Jinghua <zhongjinghua@huawei.com> Signed-off-by:
Li Nan <linan122@huawei.com>
Loading
Please sign in to comment