mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-18 23:59:53 +00:00
[VLAN]: Fix net_device leak.
In "[VLAN]: Move device registation to seperate function" (commit e89fe42cd03c8fd3686df82d8390a235717a66de), a pile of code got moved to register_vlan_dev(), including grabbing a reference to underlying device. However, original dev_hold() had been left behind, so we leak a reference to net_device now... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2a38b775b7
commit
d9f30ec0b0
@ -562,8 +562,6 @@ static int register_vlan_device(struct net_device *real_dev,
|
||||
if (err < 0)
|
||||
goto out_free_newdev;
|
||||
|
||||
/* Account for reference in struct vlan_dev_info */
|
||||
dev_hold(real_dev);
|
||||
#ifdef VLAN_DEBUG
|
||||
printk(VLAN_DBG "Allocated new device successfully, returning.\n");
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user