From: Michael Brown Date: Fri, 20 May 2016 19:43:58 +0000 (+0100) Subject: [netdevice] Fix failure path in register_netdev() X-Git-Tag: v1.20.1~441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=231adda40f55610efd1c6028a300a3f46db23103;p=thirdparty%2Fipxe.git [netdevice] Fix failure path in register_netdev() Signed-off-by: Michael Brown --- diff --git a/src/net/netdevice.c b/src/net/netdevice.c index b834c3cd9..9df21196c 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -733,6 +733,8 @@ int register_netdev ( struct net_device *netdev ) { clear_settings ( netdev_settings ( netdev ) ); unregister_settings ( netdev_settings ( netdev ) ); err_register_settings: + list_del ( &netdev->list ); + netdev_put ( netdev ); err_duplicate: return rc; }