[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160106095910.GD23185@mwanda>
Date: Wed, 6 Jan 2016 12:59:10 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Igal Liberman <igal.liberman@...escale.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch -next] fsl/fman: double free on probe failure
"priv" is allocated with devm_kzalloc() so freeing it here with kfree()
will lead to a double free.
Fixes: 3933961682a3 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 743a393..e33d9d2 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -961,7 +961,6 @@ _return_of_node_put:
of_node_put(dev_node);
_return_dev_set_drvdata:
kfree(priv->fixed_link);
- kfree(priv);
dev_set_drvdata(dev, NULL);
_return:
return err;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists