mirror of https://gitee.com/openkylin/linux.git
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: 3933961682
('fsl/fman: Add FMan MAC driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e06a03bdf8
commit
9e02d8caaf
|
@ -961,7 +961,6 @@ static int mac_probe(struct platform_device *_of_dev)
|
||||||
of_node_put(dev_node);
|
of_node_put(dev_node);
|
||||||
_return_dev_set_drvdata:
|
_return_dev_set_drvdata:
|
||||||
kfree(priv->fixed_link);
|
kfree(priv->fixed_link);
|
||||||
kfree(priv);
|
|
||||||
dev_set_drvdata(dev, NULL);
|
dev_set_drvdata(dev, NULL);
|
||||||
_return:
|
_return:
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue