Skip to content

Commit 5d5c1d0

Browse files
committed
Suppress use-after-free warning by gcc-12
1 parent 431fdc9 commit 5d5c1d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12368,6 +12368,7 @@ objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t old_size)
1236812368

1236912369
objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE) {
1237012370
free(ptr);
12371+
ptr = NULL;
1237112372
RB_DEBUG_COUNTER_INC(heap_xfree);
1237212373
}
1237312374
}

0 commit comments

Comments
 (0)