Suppress use-after-free warning by gcc-12
This commit is contained in:
parent
431fdc9200
commit
5d5c1d0fbd
1
gc.c
1
gc.c
@ -12368,6 +12368,7 @@ objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t old_size)
|
|||||||
|
|
||||||
objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE) {
|
objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE) {
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
ptr = NULL;
|
||||||
RB_DEBUG_COUNTER_INC(heap_xfree);
|
RB_DEBUG_COUNTER_INC(heap_xfree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user