getaddrinfo memory leak

前端 未结 3 1678
我寻月下人不归
我寻月下人不归 2020-12-17 10:32

I have this code for getting information about IPv4 address:

struct addrinfo hints, *info = NULL;
char addr4[INET_ADDRSTRLEN];

memset(&hints, 0, sizeof(h         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-17 11:11

    Looking a bit the gblic, it's about object catching in case of ipv6 (look 249 line).

    As other members have explained, "still reachable" is not an error itself, but it may hide some buggy situations. In this case it's not a problem, just a warning about something that could hide something nasty.

    This warning has also been reported to redhat

    The reason of the warning for google and not for ubuntu it's beacause google has ipv6 deployed on its servers and ubuntu not, and then the catching is not performed. You can check it with:

    nslookup -q=AAAA www.google.com
    nslookup -q=AAAA www.ubuntu.com
    

提交回复
热议问题