summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2023-12-06 19:17:40 -0800
committerJohn Hawthorn <john@hawthorn.email>2023-12-07 09:22:21 -0800
commit5f81f58b2696db3c1c3fc44a2c83dbff85747100 (patch)
tree994ad533699b62c4e1b74b7bb5baafcda5de5472 /hash.c
parentca204a20231f1ecabf5a7343aec49c3ea1bac90a (diff)
Use xfree in hash_st_free
st.c redefines malloc and free to be ruby_xmalloc and ruby_xfree, so when this was copied into hash.c it ended up mismatching an xmalloc with a regular free, which ended up inflating oldmalloc_increase_bytes when hashes were freed by minor GC.
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index d025b1c30a..1545af87b2 100644
--- a/hash.c
+++ b/hash.c
@@ -1177,8 +1177,8 @@ hash_st_free(VALUE hash)
st_table *tab = RHASH_ST_TABLE(hash);
- free(tab->bins);
- free(tab->entries);
+ xfree(tab->bins);
+ xfree(tab->entries);
}
static void