Commit b50367c9 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] dgrs doesn't free on error path

From:  Marcus Alanen <maalanen@ra.abo.fi>
parent f076dd40
...@@ -1278,8 +1278,10 @@ dgrs_found_device( ...@@ -1278,8 +1278,10 @@ dgrs_found_device(
dev->init = dgrs_probe1; dev->init = dgrs_probe1;
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
ether_setup(dev); ether_setup(dev);
if (register_netdev(dev) != 0) if (register_netdev(dev) != 0) {
kfree(dev);
return -EIO; return -EIO;
}
priv->next_dev = dgrs_root_dev; priv->next_dev = dgrs_root_dev;
dgrs_root_dev = dev; dgrs_root_dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment