diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2021-03-02 18:27:43 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2021-03-02 18:27:43 +0900 |
commit | 713d6d5eb05de06a0de25feef801ff8c72c65754 (patch) | |
tree | a5024f0cd933ae62fe43eb9ae690bf426c3d7df7 /random.c | |
parent | 5816725ccc9642101d447b0f3b03c14d232aec6a (diff) |
merge revision(s) 265c0022390e3dcd4ff692fc77d29b94e652c877: [Backport #17653]
Do not allocate ractor-local storage in dfree function during GC
---
random.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -261,7 +261,8 @@ const rb_data_type_t rb_random_data_type = { static void random_mt_free(void *ptr) { - if (ptr != default_rand()) + rb_random_mt_t *rnd = rb_ractor_local_storage_ptr(default_rand_key); + if (ptr != rnd) xfree(ptr); } |