[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210104102607.8771-1-miquel.raynal@bootlin.com>
Date: Mon, 4 Jan 2021 11:26:06 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
robh+dt@...nel.org
Cc: devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org, bjorn.andersson@...aro.org,
linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v4 4/4] mtd: parsers: afs: Fix freeing the part name memory in failure
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@...aro.org>
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> Cc: Linus Walleij <linus.walleij@...aro.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Powered by blists - more mailing lists