summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-02-06 21:49:02 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 00:32:22 +0100
commitba0fd56a4fbb92999554a2e417924796c2ad2f8f (patch)
tree9939ba6b4d1d450c650fb159ed2c7031924ebafa /drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
parent[media] pvrusb2: Use sysfs_attr_init() where appropriate (diff)
downloadlinux-ba0fd56a4fbb92999554a2e417924796c2ad2f8f.tar.xz
linux-ba0fd56a4fbb92999554a2e417924796c2ad2f8f.zip
[media] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory
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>
Diffstat (limited to 'drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 40625b26ac10..cbe2f0de1442 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -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);