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:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user