mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
load.c: use ruby_sized_xfree for calloc-ed RArray VALUE
IMHO, this increases readability, too, since it's not immediately clear that the object is on the malloc heap and not a regular Ruby object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1588dc8490
commit
4f53579896
1 changed files with 1 additions and 1 deletions
2
load.c
2
load.c
|
@ -258,7 +258,7 @@ loaded_features_index_clear_i(st_data_t key, st_data_t val, st_data_t arg)
|
||||||
VALUE obj = (VALUE)val;
|
VALUE obj = (VALUE)val;
|
||||||
if (!SPECIAL_CONST_P(obj)) {
|
if (!SPECIAL_CONST_P(obj)) {
|
||||||
rb_ary_free(obj);
|
rb_ary_free(obj);
|
||||||
xfree((void *)obj);
|
ruby_sized_xfree((void *)obj, sizeof(struct RArray));
|
||||||
}
|
}
|
||||||
return ST_DELETE;
|
return ST_DELETE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue