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
Родитель ae19a18996
Коммит 4fb8d00436
1 изменённых файлов: 1 добавлений и 1 удалений

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