Linux Media Controller development
 help / color / mirror / Atom feed
* [patch 2/2] [media] r820t: memory leak in release()
@ 2013-04-18 19:21 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-04-18 19:21 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, kernel-janitors

I've moved the kfree(fe->tuner_priv) one line earlier, otherwise it is
a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is a static checker fix and I have not tested it.

diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
index ba033fd..36ddbf1 100644
--- a/drivers/media/tuners/r820t.c
+++ b/drivers/media/tuners/r820t.c
@@ -2252,9 +2252,8 @@ static int r820t_release(struct dvb_frontend *fe)
 
 	mutex_unlock(&r820t_list_mutex);
 
-	fe->tuner_priv = NULL;
-
 	kfree(fe->tuner_priv);
+	fe->tuner_priv = NULL;
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-18 19:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 19:21 [patch 2/2] [media] r820t: memory leak in release() Dan Carpenter

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