public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] media: video/tuner-core, fix memory leak
@ 2010-01-06 16:47 Jiri Slaby
  2010-01-06 16:53 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2010-01-06 16:47 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-kernel, jirislaby, Mauro Carvalho Chehab, linux-media

Stanse found a memory leak in tuner_probe. t is not
freed/assigned on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
---
 drivers/media/video/tuner-core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 5b3eaa1..c4dab6c 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1078,6 +1078,7 @@ static int tuner_probe(struct i2c_client *client,
 
 				goto register_client;
 			}
+			kfree(t);
 			return -ENODEV;
 		case 0x42:
 		case 0x43:
-- 
1.6.5.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-06 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 16:47 [PATCH 1/2] media: video/tuner-core, fix memory leak Jiri Slaby
2010-01-06 16:53 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox