Skip to content
Commit b0dd77a7 authored by YueHaibing's avatar YueHaibing Committed by Boris Brezillon
Browse files

mtd: docg3: fix a possible memory leak of mtd->name



In case DOC_CHIPID_G3, mtd->name is not freed in err handling path,
which is alloced by kasprintf(). Fix this by using devm_kasprintf().

Fixes: ae9d4934 ("mtd: docg3: add multiple floor support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarBoris Brezillon <bbrezillon@kernel.org>
parent f7fd818c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment