aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-05-14 02:51:18 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-14 02:51:18 -0400
commit4b95ede6f6116ae1c0ed9605ec97d856c4814569 (patch)
treeeed0dbc4752ec5f3118cb1da7b56e822caccbd45 /drivers/net/ppp_generic.c
parent01b7a314291b2ef56ad718ee1374a1bac4768b29 (diff)
ppp: Do not free not yet unregistered net device.
An error path in ppp_create_interface() lacks one and may BUG in free_netdev() checking for proper dev->reg_state. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index d3207c0da895..1f4ca2b54a73 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -2458,6 +2458,7 @@ ppp_create_interface(int unit, int *retp)
2458 2458
2459out3: 2459out3:
2460 atomic_dec(&ppp_unit_count); 2460 atomic_dec(&ppp_unit_count);
2461 unregister_netdev(dev);
2461out2: 2462out2:
2462 mutex_unlock(&all_ppp_mutex); 2463 mutex_unlock(&all_ppp_mutex);
2463 free_netdev(dev); 2464 free_netdev(dev);