Hi All,
>From NetBSD:
Coverity CID 1736
Close fd sfo & sfi before returning from whois().
whois() is called from within a loop before exiting.
for (name = *argv; (name = *argv) != NULL; argv++)
rval += whois(name, host ? host : choose_server(name, country),
port_whois, flags);
exit(rval);
Index: src/usr.bin/whois/whois.c
===================================================================
RCS file: /cvs/src/usr.bin/whois/whois.c,v
retrieving revision 1.45
diff -u -p -r1.45 whois.c
--- src/usr.bin/whois/whois.c 25 Nov 2013 18:06:32 -0000 1.45
+++ src/usr.bin/whois/whois.c 1 Jan 2014 10:59:12 -0000
@@ -260,6 +260,8 @@ whois(const char *query, const char *ser
free(nhost);
}
freeaddrinfo(res);
+ (void)fclose(sfi);
+ (void)fclose(sfo);
return (error);
}