Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e02d8ca authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: 39339616 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e06a03bd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -961,7 +961,6 @@ static int mac_probe(struct platform_device *_of_dev)
	of_node_put(dev_node);
_return_dev_set_drvdata:
	kfree(priv->fixed_link);
	kfree(priv);
	dev_set_drvdata(dev, NULL);
_return:
	return err;