aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/raddrinfo.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ecc0958f16..8e81106af9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 20 12:42:06 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * ext/socket/raddrinfo.c (rb_getaddrinfo): according to my
+ valgrind output this variable should be initialized beforehand.
+
Tue Jul 20 12:50:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (io_flush_buffer): write and buffer operations should be
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 2e5f95ad1d..c386bb9003 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -172,6 +172,7 @@ rb_getaddrinfo(const char *node, const char *service,
#else
struct getaddrinfo_arg arg;
int ret;
+ MEMZERO(&arg, sizeof arg, 1);
arg.node = node;
arg.service = service;
arg.hints = hints;