2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

netdev: Clean up on "construct" error in netdev_open().

Reported-by: ZhengLingyun <konghuarukhr@163.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-08-10 20:46:21 -07:00
parent d33ed21806
commit d72e22c841

View File

@@ -328,6 +328,9 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp)
atomic_add(&rc->ref_cnt, 1, &old_ref_cnt); atomic_add(&rc->ref_cnt, 1, &old_ref_cnt);
} else { } else {
free(netdev->name);
ovs_assert(list_is_empty(&netdev->saved_flags_list));
shash_delete(&netdev_shash, netdev->node);
rc->class->dealloc(netdev); rc->class->dealloc(netdev);
} }
} else { } else {