Messages in this thread | | | From | Miquel Raynal <> | Subject | Re: [PATCH v4 4/4] mtd: parsers: afs: Fix freeing the part name memory in failure | Date | Mon, 4 Jan 2021 11:26:06 +0100 |
| |
On Mon, 2021-01-04 at 04:11:37 UTC, Manivannan Sadhasivam wrote: > In the case of failure while parsing the partitions, the iterator should > be pre decremented by one before starting to free the memory allocated > by kstrdup(). Because in the failure case, kstrdup() will not succeed > and thus no memory will be allocated for the current iteration. > > Fixes: 1fca1f6abb38 ("mtd: afs: simplify partition parsing") > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > Cc: Linus Walleij <linus.walleij@linaro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
| |