From: Ben Pfaff Date: Fri, 9 Jan 2009 01:10:34 +0000 (-0800) Subject: netdev: Fix file descriptor leak. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=32ea83d86fe8658608e219d5e4ecdb5eb86e22db;p=sliver-openvswitch.git netdev: Fix file descriptor leak. This could be important since it leaks a file descriptor on every netdev_open(), but only if an IPv6 address is configured on the network device (which is rare and indicates an error condition for OpenFlow). Found by Chris Eagle via Fortify. --- diff --git a/lib/netdev.c b/lib/netdev.c index 08afc390a..e83c64752 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -145,6 +145,7 @@ get_ipv6_address(const char *name, struct in6_addr *in6) ifname) == 17 && !strcmp(name, ifname)) { + fclose(file); return; } }