Fix leak when issuing new warning implemented by #33305
Rafael Garcia-Suarez [Thu, 14 Feb 2008 15:05:38 +0000 (15:05 +0000)]
p4raw-id: //depot/perl@33308

op.c

diff --git a/op.c b/op.c
index 2c03377..ab5041f 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1075,7 +1075,7 @@ Perl_scalarvoid(pTHX_ OP *o)
            no_bareword_allowed(o);
        else {
            if (ckWARN(WARN_VOID)) {
-               SV* msv = Perl_newSVpvf(aTHX_ "a constant (%"SVf")", sv);
+               SV* msv = sv_2mortal(Perl_newSVpvf(aTHX_ "a constant (%"SVf")", sv));
                useless = SvPV_nolen(msv);
                if (o->op_private & OPpCONST_ARYBASE)
                    useless = NULL;