Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) RT-Send-CC: X-RT-Original-Encoding: iso-8859-1 Content-Length: 857 Thanks for the report and proposed fix. I have an idea for fixing the problem more robustly. I don't have any better ideas than yours on how to detect whether we need the workaround, but when we do apply the workaround, we shouldn't need to make assumptions about whether the system getaddrinfo() allocated ai_canonname or not. What we should do instead is: 1. Store the system getaddrinfo result in a temporary. 2. Construct our own copy of the result, allocated with our own code, containing the modified ai_canonname fields. 3. Free the system getaddrinfo result with the system freeaddrinfo. 4. When our freeaddrinfo wrapper is called, use our own code to free the addrinfo structure, which we know was constructed with our own code. I will likely apply your patch in addition so that we aren't doing unnecessary extra work on modern Linux systems.