public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: dwmw2@infradead.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] memory leak in mtdblock.c found by checker
Date: Tue, 23 Sep 2003 16:14:39 -0300	[thread overview]
Message-ID: <3F709B9F.8080607@terra.com.br> (raw)

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

	Hi David,

	Patch against 2.6-test5, which checks the right variable if kmalloc 
failed.

	Please apply,

Felipe

[-- Attachment #2: mtdblock-leak.patch --]
[-- Type: text/plain, Size: 391 bytes --]

--- linux-2.6.0-test5/drivers/mtd/mtdblock.c.orig	2003-09-23 16:09:37.000000000 -0300
+++ linux-2.6.0-test5/drivers/mtd/mtdblock.c	2003-09-23 16:10:50.000000000 -0300
@@ -275,7 +275,7 @@
 	
 	/* OK, it's not open. Create cache info for it */
 	mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
-	if (!mtdblks)
+	if (!mtdblk)
 		return -ENOMEM;
 
 	memset(mtdblk, 0, sizeof(*mtdblk));

             reply	other threads:[~2003-09-23 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-23 19:14 Felipe W Damasio [this message]
2003-10-04 17:16 ` [PATCH] memory leak in mtdblock.c found by checker David Woodhouse

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=3F709B9F.8080607@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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