提交 1118f8d0 编写于 作者: D Daeseok Youn 提交者: Stefan Richter

firewire: net: fix NULL derefencing in fwnet_probe()

"dev" and "net" are NULL when alloc_netdev() is failed.
So just unlock and return an error.
Signed-off-by: NDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 d6d211db
......@@ -1462,8 +1462,8 @@ static int fwnet_probe(struct fw_unit *unit,
net = alloc_netdev(sizeof(*dev), "firewire%d", fwnet_init_dev);
if (net == NULL) {
ret = -ENOMEM;
goto out;
mutex_unlock(&fwnet_device_mutex);
return -ENOMEM;
}
allocated_netdev = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册