diff options
author | John Hawthorn <[email protected]> | 2024-12-11 14:44:50 -0800 |
---|---|---|
committer | John Hawthorn <[email protected]> | 2024-12-11 15:37:32 -0800 |
commit | d84859061a39b81b85bdbae8cfff5088a5c78a93 () | |
tree | e80a4ac0dfe6da78c832f2df994264eebfd88ff8 /prism_compile.c | |
parent | 9fe6fd86936ead769fe983feb5461ca4f192f16e (diff) |
Use ruby_strdup/xfree in fast_fallback
Any memory allocated with xmalloc needs to be matched with xfree rather than plain free. Ruby unfortunately redefines strdup to be ruby_strdup, which uses xmalloc so needs to be xfreed. Previously these were mismatched. This commit changes the copy to be an explicit ruby_strdup (to avoid confusion) and the free to be xfree.
Notes: Merged: https://.com/ruby/ruby/pull/12311
0 files changed, 0 insertions, 0 deletions