提交 9e02d8ca 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e06a03bd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册