aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-04-07 15:23:48 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 08:28:47 -0400
commit3f84a4e1c1b785ff5dd3952cb2d4b3008b68ae45 (patch)
tree4d6867015ab96bf7c369ce4ed87ed7215bbdc585 /drivers/media/video/cx23885/cx23885-cards.c
parent451a51b218df9a3a93af9fd71a356cc6043df52a (diff)
[media] cx23885: Don't leak firmware in cx23885_card_setup()
We leak the memory allocated to 'fw' (the firmware) when the variable goes out of scope. Fix the leak by calling release_firmware(fw) before 'fw' goes out of scope. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ea88722cb4ab..2354336862cf 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -1399,6 +1399,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1399 else 1399 else
1400 altera_init(&netup_config, fw); 1400 altera_init(&netup_config, fw);
1401 1401
1402 release_firmware(fw);
1402 break; 1403 break;
1403 } 1404 }
1404 } 1405 }