2
0
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:
Ben Pfaff
2013-07-25 14:41:12 -07:00
parent 6de8e4b2e8
commit a5440992d6

View File

@@ -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;
}