1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Do not allocate ractor-local storage in dfree function during GC

This commit is contained in:
Nobuyoshi Nakada 2021-02-09 01:00:00 +09:00
parent 0d89aedb73
commit 265c002239
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -263,7 +263,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);
}