summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 00:45:11 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 00:45:11 (GMT)
commit4fb8d00436dc2c80dc0b15ecc3e803587c817246 (patch)
tree45f2f497518af375d039a31b18d56b66c8d0c3f8
parentae19a18996727954cba2da90ab816e2d5023822a (diff)
iseq.c: avoid Null pointer dereference
detected by coverity scan git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 1f2578a..e327cd9 100644
--- a/iseq.c
+++ b/iseq.c
@@ -115,7 +115,7 @@ rb_iseq_free(const rb_iseq_t *iseq)
ruby_xfree(body);
}
- if (ISEQ_EXECUTABLE_P(iseq) && iseq->aux.exec.local_hooks) {
+ if (iseq && ISEQ_EXECUTABLE_P(iseq) && iseq->aux.exec.local_hooks) {
rb_hook_list_free(iseq->aux.exec.local_hooks);
}