projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f74d6b9
)
netdev: Fix file descriptor leak.
author
Ben Pfaff
<blp@nicira.com>
Fri, 9 Jan 2009 01:10:34 +0000
(17:10 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 13 Jan 2009 01:00:29 +0000
(17:00 -0800)
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.
lib/netdev.c
patch
|
blob
|
history
diff --git
a/lib/netdev.c
b/lib/netdev.c
index 67966015dc415162d84c834d38b8ff88b0e96bd8..5d6f2246bbcb796a55d187aaf24d6855260a3532 100644
(file)
--- 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;
}
}