[media] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory
authorJesper Juhl <jj@chaosbits.net>
Sun, 6 Feb 2011 20:49:02 +0000 (17:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:32:22 +0000 (20:32 -0300)
In drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c:ttusb_boot_dsp() we
need to call release_firmware(fw) before returning or we'll leak - no
matter if we succeed or fail.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c

index 40625b26ac10a52a305d156f91b7040abba73a39..cbe2f0de1442f11f8b5f2ccb0efe3fdec10bf027 100644 (file)
@@ -334,6 +334,7 @@ static int ttusb_boot_dsp(struct ttusb *ttusb)
        err = ttusb_cmd(ttusb, b, 4, 0);
 
       done:
+       release_firmware(fw);
        if (err) {
                dprintk("%s: usb_bulk_msg() failed, return value %i!\n",
                        __func__, err);