mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <wenwen@cs.uga.edu>
Cc: <marek.vasut@gmail.com>, <dwmw2@infradead.org>,
	<computersforpeace@gmail.com>, <miquel.raynal@bootlin.com>,
	<richard@nod.at>, <vigneshr@ti.com>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mtd: spi-nor: fix a memory leak bug
Date: Tue, 20 Aug 2019 14:54:34 +0000	[thread overview]
Message-ID: <a2eced51-aa2a-0609-530a-16e03e78ae19@microchip.com> (raw)
In-Reply-To: <1566234960-3226-1-git-send-email-wenwen@cs.uga.edu>



On 08/19/2019 08:16 PM, Wenwen Wang wrote:
> External E-Mail
> 
> 
> In spi_nor_parse_4bait(), 'dwords' is allocated through kmalloc(). However,
> it is not deallocated in the following execution if spi_nor_read_sfdp()
> fails, leading to a memory leak. To fix this issue, free 'dwords' before
> returning the error.
> 
> Fixes: 816873eaeec6 ("mtd: spi-nor: parse SFDP 4-byte Address Instruction
> Table")
> 

^ Miquel, maybe you can drop this new line when applying.

> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>

This is a good candidate for mtd/fixes, so:

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

  reply	other threads:[~2019-08-20 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 17:16 Wenwen Wang
2019-08-20 14:54 ` Tudor.Ambarus [this message]
2019-08-21  8:23 ` Tudor.Ambarus

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=a2eced51-aa2a-0609-530a-16e03e78ae19@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=wenwen@cs.uga.edu \
    /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®