Re: [v4,-next] mtd: docg3: fix a possible memory leak of mtd->name

2019-01-28 Thread Boris Brezillon
On Fri, 2019-01-25 at 02:12:42 UTC, YueHaibing wrote: > 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: ae9d4934b2d7 ("mtd: docg3: add multiple floor support") > Signed-off-by: YueHaibing Applie

[PATCH v4 -next] mtd: docg3: fix a possible memory leak of mtd->name

2019-01-24 Thread YueHaibing
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: ae9d4934b2d7 ("mtd: docg3: add multiple floor support") Signed-off-by: YueHaibing --- v4: remove 'kfree' in remove patch v3: use devm_kasprintf --- driv