Re: [PATCH v3 -next] mtd: docg3: Fix a possible memory leak of mtd->name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



YueHaibing <yuehaibing@xxxxxxxxxx> writes:

> 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>
> ---
> v3: use devm_kasprintf
> ---
>  drivers/mtd/devices/docg3.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

Cheers.

--
Robert

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux