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

dm9000: NULL dereferences on error in probe()

The dm9000_release_board() function is called with NULL ->data_req and
->addr_req pointers if dm9000_probe() fails.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 188b1210
......@@ -817,10 +817,12 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
/* release the resources */
release_resource(db->data_req);
if (db->data_req)
release_resource(db->data_req);
kfree(db->data_req);
release_resource(db->addr_req);
if (db->addr_req)
release_resource(db->addr_req);
kfree(db->addr_req);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册