Bug in mingw/device.c: addrinfo structure is freed too early
Christian Cier-Zniewski
christian.cier at uni-dortmund.de
Sun Apr 15 13:23:40 CEST 2007
Hello,
there is a small bug in mingw/device.c :
After freeing the addrinfo structure there are further accesses to
members of the structure. I discovered this bug while using this code
unter MS Visual Studio.
------
freeaddrinfo(ai);
if(sock < 0) {
logger(LOG_ERR, _("System call `%s' failed: %s"), "socket",
strerror(errno));
return -1;
}
if(connect(sock, ai->ai_addr, ai->ai_addrlen)) {
logger(LOG_ERR, _("System call `%s' failed: %s"), "connect",
strerror(errno));
return -1;
}
-------
Regards,
Christian
More information about the tinc-devel
mailing list