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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
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;
 }
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux