Re: [v4,-next] mtd: docg3: fix a possible memory leak of mtd->name
From: Boris Brezillon
Date: Mon Jan 28 2019 - 04:36:33 EST
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 <yuehaibing@xxxxxxxxxx>
Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks.
Boris