[PATCH] [media] dib0700: Fix memory leak during initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reported by kmemleak.

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Cc: Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux