[ovs-dev] [netdev 04/27] netdev-bsd: Fix fd leak on error path.
Ben Pfaff
blp at nicira.com
Thu Aug 1 21:29:27 UTC 2013
Signed-off-by: Ben Pfaff <blp at nicira.com>
CC: Ed Maste <emaste at freebsd.org>
---
lib/netdev-bsd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 903659f..65e1d25 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -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;
}
--
1.7.10.4
More information about the dev
mailing list