|
@@ -4042,6 +4042,8 @@ EXPORT_SYMBOL(alloc_netdev_mq);
|
|
|
*/
|
|
*/
|
|
|
void free_netdev(struct net_device *dev)
|
|
void free_netdev(struct net_device *dev)
|
|
|
{
|
|
{
|
|
|
|
|
+ release_net(dev_net(dev));
|
|
|
|
|
+
|
|
|
/* Compatibility with error handling in drivers */
|
|
/* Compatibility with error handling in drivers */
|
|
|
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
|
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
|
|
kfree((char *)dev - dev->padded);
|
|
kfree((char *)dev - dev->padded);
|