summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/raddrinfo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 1ec03eb4897..ceed9c3ac15 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -718,8 +718,7 @@ get_addrinfo(VALUE self)
static rb_addrinfo_t *
alloc_addrinfo()
{
- rb_addrinfo_t *rai = ALLOC(rb_addrinfo_t);
- memset(rai, 0, sizeof(rb_addrinfo_t));
+ rb_addrinfo_t *rai = ZALLOC(rb_addrinfo_t);
rai->inspectname = Qnil;
rai->canonname = Qnil;
return rai;