aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-01-17 15:55:08 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-01-19 10:25:02 -0500
commitd0b774cfb8ddf075c23d1b5ab1fc6f47123ccf65 (patch)
tree09b3712a3bb799c88ac04f05e21be9a9dcae4936 /iseq.h
parentd29cd972f704b42a25a8de2e5f5380f8aee3144a (diff)
downloadruby-d0b774cfb8ddf075c23d1b5ab1fc6f47123ccf65.tar.gz
Remove null checks for xfree
xfree can handle null values, so we don't need to check it.
Diffstat (limited to 'iseq.h')
-rw-r--r--iseq.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/iseq.h b/iseq.h
index d71f37ca13..35780f2862 100644
--- a/iseq.h
+++ b/iseq.h
@@ -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 *