浏览代码

[netdevice] Fix failure path in register_netdev()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 年前
父节点
当前提交
231adda40f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      src/net/netdevice.c

+ 2
- 0
src/net/netdevice.c 查看文件

@@ -733,6 +733,8 @@ int register_netdev ( struct net_device *netdev ) {
733 733
 	clear_settings ( netdev_settings ( netdev ) );
734 734
 	unregister_settings ( netdev_settings ( netdev ) );
735 735
  err_register_settings:
736
+	list_del ( &netdev->list );
737
+	netdev_put ( netdev );
736 738
  err_duplicate:
737 739
 	return rc;
738 740
 }

正在加载...
取消
保存