From 3f84a4e1c1b785ff5dd3952cb2d4b3008b68ae45 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Thu, 7 Apr 2011 16:23:48 -0300 Subject: [PATCH] [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx23885/cx23885-cards.c | 1 + 1 file changed, 1 insertion(+) 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) else altera_init(&netup_config, fw); + release_firmware(fw); break; } } -- 2.34.1