summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 00:45:11 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 00:45:11 +0000
commit4fb8d00436dc2c80dc0b15ecc3e803587c817246 (patch)
tree45f2f497518af375d039a31b18d56b66c8d0c3f8 /iseq.c
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
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 1f2578a108..e327cd9976 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);
}