From: Pavel Emelyanov Date: Wed, 14 May 2008 06:51:18 +0000 (-0700) Subject: ppp: Do not free not yet unregistered net device. X-Git-Tag: v2.6.26-rc3~65^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4b95ede6f6116ae1c0ed9605ec97d856c4814569;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index d3207c0da89..1f4ca2b54a7 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -2458,6 +2458,7 @@ ppp_create_interface(int unit, int *retp) out3: atomic_dec(&ppp_unit_count); + unregister_netdev(dev); out2: mutex_unlock(&all_ppp_mutex); free_netdev(dev);