summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 21:40:54 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 21:40:54 (GMT)
commit4f5357989697b71fa9e73d3e4e87226aa5cdbb2e (patch)
treeaa4a7652e55fc9db80a7db3381ec5e8663e5e27f /load.c
parent1588dc8490c3e4ac193ae8af1122caf18097027f (diff)
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
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 81d943c..463c890 100644
--- a/load.c
+++ b/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;
if (!SPECIAL_CONST_P(obj)) {
rb_ary_free(obj);
- xfree((void *)obj);
+ ruby_sized_xfree((void *)obj, sizeof(struct RArray));
}
return ST_DELETE;
}