]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ppp: Do not free not yet unregistered net device.
authorPavel Emelyanov <xemul@openvz.org>
Wed, 14 May 2008 06:51:18 +0000 (23:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 May 2008 06:51:18 +0000 (23:51 -0700)
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>
drivers/net/ppp_generic.c

index d3207c0da89561eb345b1d0873eb19b5a3695438..1f4ca2b54a73370213d1ce162c5c048e00bfc732 100644 (file)
@@ -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);