Linux Media Controller development
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: LMML <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Devin Heitmueller <dheitmueller@kernellabs.com>
Subject: [PATCH] [media] dib0700: Fix memory leak during initialization
Date: Sun, 12 Feb 2012 11:19:11 +0100	[thread overview]
Message-ID: <20120212111911.32f4c390@endymion.delvare> (raw)

Reported by kmemleak.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
---
I am not familiar with the usb API, are we also supposed to call
usb_kill_urb() in the error case maybe?

 drivers/media/dvb/dvb-usb/dib0700_core.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-3.3-rc3.orig/drivers/media/dvb/dvb-usb/dib0700_core.c	2012-01-20 14:06:38.000000000 +0100
+++ linux-3.3-rc3/drivers/media/dvb/dvb-usb/dib0700_core.c	2012-02-12 00:32:19.005334036 +0100
@@ -787,6 +787,8 @@ int dib0700_rc_setup(struct dvb_usb_devi
 	if (ret)
 		err("rc submit urb failed\n");
 
+	usb_free_urb(purb);
+
 	return ret;
 }
 

-- 
Jean Delvare

             reply	other threads:[~2012-02-12 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 10:19 Jean Delvare [this message]
2012-03-08 11:21 ` [PATCH] [media] dib0700: Fix memory leak during initialization Mauro Carvalho Chehab
2012-03-12 10:04   ` Jean Delvare
2012-03-12 10:28     ` Mauro Carvalho Chehab
2012-03-13 17:48       ` Jean Delvare

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=20120212111911.32f4c390@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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