Project

General

Profile

Actions

Bug #11051

closed

Addrinfo#marshal_load がメモリーリーク

Added by tommy (Masahiro Tomita) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p88 (2015-03-25) [x86_64-linux]
[ruby-dev:<unknown>]

Description

Addrinfo#marshal_load がメモリーリークしているように思います。

diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index e13684a..d838898 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;
       }
     }
Actions #1

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r50187.


raddrinfo.c: fix memory leak

Actions #2

Updated by usa (Usaku NAKAMURA) about 7 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED
Actions #3

Updated by usa (Usaku NAKAMURA) about 7 years ago

  • Backport changed from 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED

ruby_2_1 r50575 merged revision(s) 50187,50202.

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE

Backported into ruby_2_2 at r50623.

Actions

Also available in: Atom PDF