Remove null checks for xfree

xfree can handle null values, so we don't need to check it.
This commit is contained in:
Peter Zhu 2024-01-17 15:55:08 -05:00
parent d29cd972f7
commit d0b774cfb8
11 changed files with 18 additions and 37 deletions

4
iseq.h
View file

@ -66,9 +66,7 @@ ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
{
void *ptr = ISEQ_BODY(iseq)->variable.original_iseq;
ISEQ_BODY(iseq)->variable.original_iseq = NULL;
if (ptr) {
ruby_xfree(ptr);
}
ruby_xfree(ptr);
}
static inline VALUE *