mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Parag Warudkar" <parag.warudkar@gmail.com>
To: justinmattock@gmail.com
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"akpm@osdl.org" <akpm@linux-foundation.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: [PATCH] isight_firmware : Fix a leak and double kfree()
Date: Thu, 7 Aug 2008 13:34:14 -0400	[thread overview]
Message-ID: <82e4877d0808071034o3ec31f75k95308ed585563b2e@mail.gmail.com> (raw)

Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com>

--- linux-2.6/drivers/usb/misc/isight_firmware.c	2008-07-29
23:26:24.000000000 -0400
+++ linux-2.6-wk/drivers/usb/misc/isight_firmware.c	2008-08-07
13:23:01.000000000 -0400
@@ -48,7 +48,8 @@

 	if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) {
 		printk(KERN_ERR "Unable to load isight firmware\n");
-		return -ENODEV;
+		ret = -ENODEV;
+		goto out;
 	}

 	ptr = firmware->data;
@@ -91,7 +92,6 @@
 			     buf, llen, 300) != llen) {
 				printk(KERN_ERR
 				       "Failed to load isight firmware\n");
-				kfree(buf);
 				ret = -ENODEV;
 				goto out;
 			}

             reply	other threads:[~2008-08-07 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 17:34 Parag Warudkar [this message]
2008-08-07 19:09 ` Justin Mattock

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=82e4877d0808071034o3ec31f75k95308ed585563b2e@mail.gmail.com \
    --to=parag.warudkar@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=justinmattock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®