d3fc257245
In client_connect() getaddrinfo() stores the head of the allocated addrinfo structure list in 'res0'. 'res' is used to walk the list and will be NULL at the end of the for() loop when freeaddrinfo(res) is executed. Pass 'res0' to freeaddrinfo() instead of 'res'. Change-Id: Ie1358c0356b6b0f98470e46e25216cfa0ab4adac