summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-11-20 20:34:33 -0500
committerRich Felker <dalias@aerifal.cx>2013-11-20 20:34:33 -0500
commitceb0ed9cf96d90e613a2c55a84ac0c8172fc7f10 (patch)
treeefba7826947e501b321425a5d201003bff719efc /src/network
parent5d01ab4ac64b913c537e91f7c01d5c8e910151da (diff)
downloadmusl-ceb0ed9cf96d90e613a2c55a84ac0c8172fc7f10.tar.gz
fix fd leak (missing close-on-exec) in getifaddrs
Diffstat (limited to 'src/network')
-rw-r--r--src/network/getifaddrs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c
index a14ac1b3..fc49929a 100644
--- a/src/network/getifaddrs.c
+++ b/src/network/getifaddrs.c
@@ -66,7 +66,7 @@ static void ipv6netmask(unsigned prefix_length, struct sockaddr_in6 *sa)
static void dealwithipv6(stor **list, stor** head)
{
- FILE* f = fopen("/proc/net/if_inet6", "r");
+ FILE* f = fopen("/proc/net/if_inet6", "rbe");
/* 00000000000000000000000000000001 01 80 10 80 lo
A B C D E F
all numbers in hex