lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1104072118310.1538@swampdragon.chaosbits.net>
Date:	Thu, 7 Apr 2011 21:23:48 +0200 (CEST)
From:	Jesper Juhl <jj@...osbits.net>
To:	Mauro Carvalho Chehab <mchehab@...radead.org>
cc:	Andy Walls <awalls@...metrocast.net>, linux-media@...r.kernel.org,
	Alexey Chernov <4ernov@...il.com>,
	linux-kernel@...r.kernel.org,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	"Igor M. Liplianin" <liplianin@...up.ru>,
	Steven Toth <stoth@...uxtv.org>
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 <jj@...osbits.net>
---
 cx23885-cards.c |    1 +
 1 file changed, 1 insertion(+)

  compile tested only.

diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ea88722..2354336 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;
 	}
 	}


-- 
Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ