Commit e4cc7031 authored by Linus Torvalds's avatar Linus Torvalds

Revert over-eager memory leak "fix" from the -dj merge

parent 819d8816
......@@ -1085,7 +1085,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev,
#endif
return 0;
err: unregister_netdev(dev);
kfree(dev->priv);
/* This will also free the co-allocated 'dev->priv' */
kfree(dev);
return -ENODEV;
}
......@@ -1142,8 +1142,8 @@ static void __exit myri_sbus_cleanup(void)
struct myri_eth *next = root_myri_dev->next_module;
unregister_netdev(root_myri_dev->dev);
/* this will also free the co-allocated 'root_myri_dev' */
kfree(root_myri_dev->dev);
kfree(root_myri_dev);
root_myri_dev = next;
}
#endif /* MODULE */
......
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