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.
This commit is contained in:
John Hawthorn 2023-12-06 19:17:40 -08:00
parent ca204a2023
commit 5f81f58b26

4
hash.c
View File

@ -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