CVSROOT: /cvs Module name: src Changes by: j...@cvs.openbsd.org 2018/06/19 05:28:11
Modified files: usr.bin/whois : whois.c Log message: Plug getaddrinfo(3) memory leak choose_server() calls getaddrinfo(3) but never frees the result. Minimal fix that relies on getaddrinfo(3) only updating the "res" pointer if the call was successful. While here, call freeaddrinfo(3) earlier in whois(), less code and less overall memory used since whois() can recurse. ok millert@ tb@ benno@