summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-01 02:18:40 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-01 02:18:40 (GMT)
commit8717a9ec861ac129d3c93f8eb44e8c3ef07ed9af (patch)
tree5830f5b5010807faa613d1f66c6df5b2fbc999ef /symbol.c
parentabe15dddf73386971d22c0652ee1a48443aebb57 (diff)
symbol.c: fix memory leak from global fstr hash
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash * test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug [ruby-core:67268] [Bug #10686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index f067ebe..1127020 100644
--- a/symbol.c
+++ b/symbol.c
@@ -664,6 +664,7 @@ rb_gc_free_dsymbol(VALUE sym)
if (str) {
RSYMBOL(sym)->fstr = 0;
unregister_sym(str, sym);
+ rb_hash_delete_entry(global_symbols.dsymbol_fstr_hash, str);
}
}