Christian Cier-Zniewski
2007-Apr-15 13:24 UTC
Bug in mingw/device.c: addrinfo structure is freed too early
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