summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-11-13 23:41:19 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-11-14 09:53:46 -0800
commit8ca8859f11d3a842e8fc7a0c1d2bb21e709d5a3b (patch)
treefaf1a2062bf080e196a648180a972f55ffd96204 /op.c
parentca9fab4684db1c2d435d11b9339f25cf4a8d3fba (diff)
downloadperl-8ca8859f11d3a842e8fc7a0c1d2bb21e709d5a3b.tar.gz
Stop my subs with syntax errors from leaking
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index b3ac10d3d1..3480a6c20e 100644
--- a/op.c
+++ b/op.c
@@ -6970,6 +6970,8 @@ Perl_newMYSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
if (PL_parser && PL_parser->error_count) {
op_free(block);
+ SvREFCNT_dec(PL_compcv);
+ PL_compcv = 0;
goto done;
}