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>
This commit is contained in:
Pavel Emelyanov 2008-05-13 23:51:18 -07:00 committed by David S. Miller
parent 01b7a31429
commit 4b95ede6f6

View 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);