From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Wen Yang <wenyang@linux.alibaba.com>,
Joern Engel <joern@lazybastard.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] mtd: phram: fix a double free issue in error path
Date: Tue, 24 Mar 2020 23:05:46 +0100 [thread overview]
Message-ID: <20200324220546.15403-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20200318153156.25612-1-wenyang@linux.alibaba.com>
On Wed, 2020-03-18 at 15:31:56 UTC, Wen Yang wrote:
> The variable 'name' is released multiple times in the error path,
> which may cause double free issues.
> This problem is avoided by adding a goto label to release the mem
> uniformly. And this change also makes the code a bit more cleaner.
>
> Fixes: 4f678a58d335 ("mtd: fix memory leaks in phram_setup")
> Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
> Cc: Joern Engel <joern@lazybastard.org>
> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Vignesh Raghavendra <vigneshr@ti.com>
> Cc: linux-mtd@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
prev parent reply other threads:[~2020-03-24 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 15:31 Wen Yang
2020-03-24 22:05 ` Miquel Raynal [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=20200324220546.15403-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=joern@lazybastard.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=wenyang@linux.alibaba.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
all inboxes | Powered by JetHome®