ext/kgio/connect.c in kgio-2.3.3 vs ext/kgio/connect.c in kgio-2.4.0

- old
+ new

@@ -67,9 +67,10 @@ unsigned uport = FIX2UINT(port); rc = snprintf(ipport, sizeof(ipport), "%u", uport); if (rc >= (int)sizeof(ipport) || rc <= 0) rb_raise(rb_eArgError, "invalid TCP port: %u", uport); + memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; /* disallow non-deterministic DNS lookups */ hints.ai_flags = AI_NUMERICHOST;