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

2019-01-24 Thread YueHaibing
On 2019/1/24 23:00, Boris Brezillon wrote: > On Wed, 23 Jan 2019 17:28:19 +0800 > 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

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

2019-01-24 Thread Boris Brezillon
On Wed, 23 Jan 2019 17:28:19 +0800 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 > ---

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

2019-01-23 Thread Robert Jarzmik
YueHaibing 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 > --- > v3: use devm_kasprintf > --- >

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

2019-01-23 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 --- v3: use devm_kasprintf --- drivers/mtd/devices/docg3.c | 4 ++--