From: Gurusamy Sarathy Date: Thu, 26 Nov 1998 10:16:54 +0000 (+0000) Subject: fix PL_defoutgv leak under threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=901b18f1f40355e1c6bf8f01f58203410eb7eabb;p=p5sagit%2Fp5-mst-13.2.git fix PL_defoutgv leak under threads p4raw-id: //depot/perl@2301 --- diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index 4ca76ad..09751c5 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -114,8 +114,9 @@ threadstart(void *arg) thr, SvPEEK(TOPs))); sv = POPs; - SAVETMPS; PUTBACK; + ENTER; + SAVETMPS; perl_call_sv(sv, G_ARRAY|G_EVAL); SPAGAIN; retval = SP - (PL_stack_base + oldmark); @@ -140,6 +141,7 @@ threadstart(void *arg) sv_setsv(*av_fetch(av, i, TRUE), SvREFCNT_inc(*SP)); } FREETMPS; + LEAVE; finishoff: #if 0 @@ -176,7 +178,7 @@ threadstart(void *arg) Safefree(PL_screamnext); Safefree(PL_reg_start_tmp); SvREFCNT_dec(PL_lastscream); - /*SvREFCNT_dec(PL_defoutgv);*/ + SvREFCNT_dec(PL_defoutgv); MUTEX_LOCK(&thr->mutex); DEBUG_S(PerlIO_printf(PerlIO_stderr(),