Commit e700cbf9 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix crash on Windows.

parent 54e1d72f
...@@ -101,7 +101,11 @@ int ms_discover_mtu(const char *host) ...@@ -101,7 +101,11 @@ int ms_discover_mtu(const char *host)
hints.ai_family = PF_UNSPEC; hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_NUMERICHOST; hints.ai_flags = AI_NUMERICHOST;
err = getaddrinfo(host, NULL, &hints, &ai); err = getaddrinfo(host, NULL, &hints, &ai);
if (err >= 0) family = ai->ai_family; if ((err != 0) && (ai != NULL)) {
family = ai->ai_family;
freeaddrinfo(ai);
ai = NULL;
}
memset(&hints,0,sizeof(hints)); memset(&hints,0,sizeof(hints));
hints.ai_family = family; hints.ai_family = family;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment