From b3a3b3a1da8f5142edf3e194532b08316f895282 Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Sat, 17 Jan 2004 16:12:32 +0000 Subject: [perl #24914] freeing a CV reference that was currently being executed caused coredumps p4raw-id: //depot/perl@22167 --- scope.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 2c2ce3698e..1da8ebe29b 100644 --- a/scope.c +++ b/scope.c @@ -1045,8 +1045,10 @@ Perl_leave_scope(pTHX_ I32 base) break; case SAVEt_COMPPAD: PL_comppad = (PAD*)SSPOPPTR; - if (PL_comppad) + if (PL_comppad) { PL_curpad = AvARRAY(PL_comppad); + SvREFCNT_dec(PL_comppad); + } else PL_curpad = Null(SV**); break; -- cgit v1.2.1