[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbaAJdH6FebbpiAV7wmoTA8Rb_vqKyrDNLX9sy4Jv9RjQ@mail.gmail.com>
Date: Wed, 18 Nov 2020 02:17:09 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: Miquèl Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh R <vigneshr@...com>, Rob Herring <robh+dt@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-mtd@...ts.infradead.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, MSM <linux-arm-msm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] mtd: parsers: afs: Fix freeing the part name
memory in failure
On Tue, Nov 17, 2020 at 6:49 PM Manivannan Sadhasivam
<manivannan.sadhasivam@...aro.org> 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.
>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Fixes: 1fca1f6abb38 ("mtd: afs: simplify partition parsing")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Good find!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists