summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-08-06 10:06:46 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-08-06 10:06:46 +0000
commitf9be5ac81a1b4bd2859cd05fa3a616e17a46b37c (patch)
tree862135e71f979f3d2cab07dd2044a46165356df3 /gv.c
parentda6068d9464c1a68418e75b8bfb0a470c97eb9ba (diff)
downloadperl-f9be5ac81a1b4bd2859cd05fa3a616e17a46b37c.tar.gz
remove leaks associated with version object change #23190
p4raw-link: @23190 on //depot/perl: d7aa53827cc12fdf8a697328df844e16aaa58287 p4raw-id: //depot/perl@23198
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index d9d16ed0a4..7474e81d83 100644
--- a/gv.c
+++ b/gv.c
@@ -1071,9 +1071,9 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
case '\026': /* $^V */
if (len == 1) {
SV *sv = GvSV(gv);
- sv = new_version(PL_patchlevel);
- SvREADONLY_on(sv);
- GvSV(gv) = sv;
+ GvSV(gv) = new_version(PL_patchlevel);
+ SvREADONLY_on(GvSV(gv));
+ SvREFCNT_dec(sv);
}
break;
}