summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-08 23:24:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-08 23:24:10 +0000
commit816504c29c6fd304a7179882899a83db6c9cb2f1 (patch)
treef74778e804219c571baf19b2ccf9a5a882cafd9b /ext
parent119960dc56f0892951063a811276927dd60c74e4 (diff)
downloadruby-816504c29c6fd304a7179882899a83db6c9cb2f1.tar.gz
raddrinfo.c: fix memory leak
* ext/socket/raddrinfo.c (addrinfo_mload): fix memory leak of addrinfo. [ruby-dev:48923] [Bug #11051] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/raddrinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index ac36743b8a..caa08fea47 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -1643,6 +1643,7 @@ addrinfo_mload(VALUE self, VALUE ary)
len = res->ai->ai_addrlen;
memcpy(&ss, res->ai->ai_addr, res->ai->ai_addrlen);
+ rb_freeaddrinfo(res);
break;
}
}