mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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:
parent
ca204a2023
commit
5f81f58b26
1 changed files with 2 additions and 2 deletions
4
hash.c
4
hash.c
|
@ -1177,8 +1177,8 @@ hash_st_free(VALUE hash)
|
||||||
|
|
||||||
st_table *tab = RHASH_ST_TABLE(hash);
|
st_table *tab = RHASH_ST_TABLE(hash);
|
||||||
|
|
||||||
free(tab->bins);
|
xfree(tab->bins);
|
||||||
free(tab->entries);
|
xfree(tab->entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue