fix fd leak (missing close-on-exec) in getifaddrs

This commit is contained in:
Rich Felker 2013-11-20 20:34:33 -05:00
parent 5d01ab4ac6
commit ceb0ed9cf9

View File

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