RJIT: Do nothing on jit_cont_free

if cont is NULL.
This commit is contained in:
Takashi Kokubun 2023-03-09 22:31:50 -08:00
parent 4afe9c09a0
commit e07e9f8491

2
cont.c
View File

@ -1255,6 +1255,8 @@ jit_cont_new(rb_execution_context_t *ec)
static void static void
jit_cont_free(struct rb_jit_cont *cont) jit_cont_free(struct rb_jit_cont *cont)
{ {
if (!cont) return;
rb_native_mutex_lock(&jit_cont_lock); rb_native_mutex_lock(&jit_cont_lock);
if (cont == first_jit_cont) { if (cont == first_jit_cont) {
first_jit_cont = cont->next; first_jit_cont = cont->next;