From: Nicholas Clark Date: Wed, 20 May 2009 05:19:07 +0000 (+0200) Subject: In Perl_magic_clearsig(), only call LEAVE if we call ENTER. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79f8582810dc6de265f284db348dc30d7d359e3f;p=p5sagit%2Fp5-mst-13.2.git In Perl_magic_clearsig(), only call LEAVE if we call ENTER. (2d4fcd5e8be8d83efa948a259c49b56fc6c27ee5, reported and fixed by RT #20613, would ENTER but not LEAVE when HAS_SIGPROCMASK was not defined.) --- diff --git a/mg.c b/mg.c index f6b6d87..54679f8 100644 --- a/mg.c +++ b/mg.c @@ -1317,11 +1317,15 @@ Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg) if(PL_psig_ptr[i]) { SV * const to_dec=PL_psig_ptr[i]; PL_psig_ptr[i]=0; +#ifdef HAS_SIGPROCMASK LEAVE; +#endif SvREFCNT_dec(to_dec); } +#ifdef HAS_SIGPROCMASK else LEAVE; +#endif } } return 0;