diff mbox

[2/2,media] r820t: memory leak in release()

Message ID 20130418192117.GB17798@elgon.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter April 18, 2013, 7:21 p.m. UTC
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }