1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* id_table.c (mix_id_table_insert): fix memory leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-08-12 12:51:56 +00:00
parent 7630957eba
commit e514914919
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Aug 12 21:51:11 2015 Koichi Sasada <ko1@atdot.net>
* id_table.c (mix_id_table_insert): fix memory leak.
Wed Aug 12 21:17:38 2015 Eric Wong <e@80x24.org>
* iseq.c (iseq_memsize): reimplement for wrapper

View file

@ -1458,6 +1458,11 @@ mix_id_table_insert(struct mix_id_table *tbl, ID id, VALUE val)
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;