Commit cf14e914 authored by Dave Jones's avatar Dave Jones

[PATCH] memleak in myri_sbus

parent 68d83b82
...@@ -1085,6 +1085,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev, ...@@ -1085,6 +1085,7 @@ static int __init myri_ether_init(struct net_device *dev, struct sbus_dev *sdev,
#endif #endif
return 0; return 0;
err: unregister_netdev(dev); err: unregister_netdev(dev);
kfree(dev->priv);
kfree(dev); kfree(dev);
return -ENODEV; return -ENODEV;
} }
...@@ -1142,6 +1143,7 @@ static void __exit myri_sbus_cleanup(void) ...@@ -1142,6 +1143,7 @@ static void __exit myri_sbus_cleanup(void)
unregister_netdev(root_myri_dev->dev); unregister_netdev(root_myri_dev->dev);
kfree(root_myri_dev->dev); kfree(root_myri_dev->dev);
kfree(root_myri_dev);
root_myri_dev = next; root_myri_dev = next;
} }
#endif /* MODULE */ #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