ruby-changes:54291
From: k0kubun <ko1@a...>
Date: Sun, 23 Dec 2018 09:45:16 +0900 (JST)
Subject: [ruby-changes:54291] k0kubun:r66500 (trunk): iseq.c: avoid Null pointer dereference
k0kubun 2018-12-23 09:45:11 +0900 (Sun, 23 Dec 2018) New Revision: 66500 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66500 Log: iseq.c: avoid Null pointer dereference detected by coverity scan Modified files: trunk/iseq.c Index: iseq.c =================================================================== --- iseq.c (revision 66499) +++ iseq.c (revision 66500) @@ -115,7 +115,7 @@ rb_iseq_free(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L115 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/