mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Baskov Evgeiny <baskov@ispras.ru>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Cc: ldv-project@linuxtesting.org, Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH] mtd-ram: correctly free memory on error path in platram_probe()
Date: Thu, 19 Nov 2020 22:05:33 +0100	[thread overview]
Message-ID: <20201119210533.23671-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20201113160537.899-1-baskov@ispras.ru>

On Fri, 2020-11-13 at 16:05:37 UTC, Baskov Evgeiny wrote:
> If an error happens in mtd_device_parse_register or mtd_device_register,
> memory allocated for struct platram_info is leaked.
> 
> Make platram_probe() call platram_remove() on all error paths
> after struct platram_info allocation to correctly free resources.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Baskov Evgeiny <baskov@ispras.ru>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

      reply	other threads:[~2020-11-19 21:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 16:05 Baskov Evgeiny
2020-11-19 21: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=20201119210533.23671-1-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=baskov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --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

all inboxes | Powered by JetHome®