devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Miquèl Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh R" <vigneshr@ti.com>, "Rob Herring" <robh+dt@kernel.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	linux-mtd@lists.infradead.org,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>, MSM <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] mtd: parsers: afs: Fix freeing the part name memory in failure
Date: Wed, 18 Nov 2020 02:17:09 +0100	[thread overview]
Message-ID: <CACRpkdbaAJdH6FebbpiAV7wmoTA8Rb_vqKyrDNLX9sy4Jv9RjQ@mail.gmail.com> (raw)
In-Reply-To: <20201117174845.28684-5-manivannan.sadhasivam@linaro.org>

On Tue, Nov 17, 2020 at 6:49 PM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.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@linaro.org>
> Fixes: 1fca1f6abb38 ("mtd: afs: simplify partition parsing")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Good find!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

      reply	other threads:[~2020-11-18  1:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:48 [PATCH v2 0/4] Add support for Qcom SMEM based NAND parser Manivannan Sadhasivam
2020-11-17 17:48 ` [PATCH v2 1/4] dt-bindings: mtd: partitions: Add binding for Qcom SMEM parser Manivannan Sadhasivam
2020-11-17 17:48 ` [PATCH v2 2/4] mtd: parsers: Add " Manivannan Sadhasivam
2020-11-18  4:20   ` Bjorn Andersson
2020-11-18  7:19     ` Manivannan Sadhasivam
2020-11-17 17:48 ` [PATCH v2 3/4] mtd: rawnand: qcom: Add support for " Manivannan Sadhasivam
2020-11-17 17:48 ` [PATCH v2 4/4] mtd: parsers: afs: Fix freeing the part name memory in failure Manivannan Sadhasivam
2020-11-18  1:17   ` Linus Walleij [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdbaAJdH6FebbpiAV7wmoTA8Rb_vqKyrDNLX9sy4Jv9RjQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).