Browse Source

[netdevice] Fix failure path in register_netdev()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
231adda40f
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/net/netdevice.c

+ 2
- 0
src/net/netdevice.c View File

733
 	clear_settings ( netdev_settings ( netdev ) );
733
 	clear_settings ( netdev_settings ( netdev ) );
734
 	unregister_settings ( netdev_settings ( netdev ) );
734
 	unregister_settings ( netdev_settings ( netdev ) );
735
  err_register_settings:
735
  err_register_settings:
736
+	list_del ( &netdev->list );
737
+	netdev_put ( netdev );
736
  err_duplicate:
738
  err_duplicate:
737
 	return rc;
739
 	return rc;
738
 }
740
 }

Loading…
Cancel
Save