1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2018-12-23 00:45:11 +00:00
parent ae19a18996
commit 4fb8d00436

2
iseq.c
View file

@ -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);
}