ruby-changes:39467
From: ko1 <ko1@a...>
Date: Wed, 12 Aug 2015 21:52:14 +0900 (JST)
Subject: [ruby-changes:39467] ko1:r51548 (trunk): * id_table.c (mix_id_table_insert): fix memory leak.
ko1 2015-08-12 21:51:56 +0900 (Wed, 12 Aug 2015) New Revision: 51548 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51548 Log: * id_table.c (mix_id_table_insert): fix memory leak. Modified files: trunk/ChangeLog trunk/id_table.c Index: id_table.c =================================================================== --- id_table.c (revision 51547) +++ id_table.c (revision 51548) @@ -1458,6 +1458,11 @@ mix_id_table_insert(struct mix_id_table https://github.com/ruby/ruby/blob/trunk/id_table.c#L1458 hash_id_table_insert_key(hash, keys[i], values[i]); } + /* free list keys/values */ + xfree(keys); +#if ID_TABLE_USE_CALC_VALUES == 0 + xfree(values); +#endif assert(LIST_P(tbl) == 0); } return r; Index: ChangeLog =================================================================== --- ChangeLog (revision 51547) +++ ChangeLog (revision 51548) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 12 21:51:11 2015 Koichi Sasada <ko1@a...> + + * id_table.c (mix_id_table_insert): fix memory leak. + Wed Aug 12 21:17:38 2015 Eric Wong <e@8...> * iseq.c (iseq_memsize): reimplement for wrapper -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/