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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment