From 4fb8d00436dc2c80dc0b15ecc3e803587c817246 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 23 Dec 2018 00:45:11 +0000 Subject: [PATCH] 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 --- iseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }