Skip to content

Commit

Permalink
[VLAN]: Fix net_device leak.
Browse files Browse the repository at this point in the history
In "[VLAN]: Move device registation to seperate function" (commit
e89fe42), 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Al Viro authored and davem330 committed Sep 16, 2007
1 parent 2a38b77 commit d9f30ec
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d9f30ec

Please sign in to comment.