The scratch scalar used in -d processing for : and = options would leak
Nicholas Clark [Sat, 6 Oct 2007 16:32:36 +0000 (16:32 +0000)]
as it was never freed.

p4raw-id: //depot/perl@32052

perl.c

diff --git a/perl.c b/perl.c
index b8096c2..3371b84 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3041,6 +3041,7 @@ Perl_moreswitches(pTHX_ char *s)
            }
            s += strlen(s);
            my_setenv("PERL5DB", SvPV_nolen_const(sv));
+           SvREFCNT_dec(sv);
        }
        if (!PL_perldb) {
            PL_perldb = PERLDB_ALL;