summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-02-06 19:50:33 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2016-02-07 08:23:46 -0500
commitab65fd1a46259a8e942fd65724ad269ebda72919 (patch)
treec6b1168ca52a31bdc0389bba5ae446ba492b62e4
parentea8da35cc190a817cc6f856224152c42806ec814 (diff)
downloadperl-ab65fd1a46259a8e942fd65724ad269ebda72919.tar.gz
assert(PL_parser)
Coverity CID 135144: Dereference after null check (FORWARD_NULL) Earlier, pp.c:8254-ish, PL_parser is tested against NULL, so it presumably can be NULL.
-rw-r--r--op.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/op.c b/op.c
index 8a8eebb690..400726cc4d 100644
--- a/op.c
+++ b/op.c
@@ -8393,6 +8393,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
: NULL;
if (block) {
+ assert(PL_parser);
/* This makes sub {}; work as expected. */
if (block->op_type == OP_STUB) {
const line_t l = PL_parser->copline;