This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Another small clean-up following changes #23190 and #23198
authorSteve Hay <SteveHay@planit.com>
Fri, 6 Aug 2004 11:57:59 +0000 (11:57 +0000)
committerSteve Hay <SteveHay@planit.com>
Fri, 6 Aug 2004 11:57:59 +0000 (11:57 +0000)
p4raw-link: @23190 on //depot/perl: d7aa53827cc12fdf8a697328df844e16aaa58287

p4raw-id: //depot/perl@23199

gv.c

diff --git a/gv.c b/gv.c
index 7474e81..a461e0d 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1063,9 +1063,9 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
            SV *sv = GvSV(gv);
            if (!sv_derived_from(PL_patchlevel, "version"))
                (void *)upg_version(PL_patchlevel);
-           sv = vnumify(PL_patchlevel);
-           SvREADONLY_on(sv);
-           GvSV(gv) = sv;
+           GvSV(gv) = vnumify(PL_patchlevel);
+           SvREADONLY_on(GvSV(gv));
+           SvREFCNT_dec(sv);
        }
        break;
     case '\026':       /* $^V */