Fix resource leaks / Remove unnecessary instantiation of InetAddresses on successful resolution