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:
parent
01b7a31429
commit
4b95ede6f6
|
@ -2458,6 +2458,7 @@ ppp_create_interface(int unit, int *retp)
|
||||||
|
|
||||||
out3:
|
out3:
|
||||||
atomic_dec(&ppp_unit_count);
|
atomic_dec(&ppp_unit_count);
|
||||||
|
unregister_netdev(dev);
|
||||||
out2:
|
out2:
|
||||||
mutex_unlock(&all_ppp_mutex);
|
mutex_unlock(&all_ppp_mutex);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
|
|
Loading…
Reference in New Issue