mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
netdev-bsd: Fix fd leak on error path.
Signed-off-by: Ben Pfaff <blp@nicira.com> CC: Ed Maste <emaste@freebsd.org>
This commit is contained in:
@@ -370,6 +370,7 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
||||
if (ioctl(netdev->tap_fd, TAPGIFNAME, &ifr) == -1) {
|
||||
/* XXX Need to destroy the device? */
|
||||
error = errno;
|
||||
close(netdev->tap_fd);
|
||||
goto error_unref_notifier;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user