This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[ PATCH] Re: strange destruction problem on VMS
authorDave Mitchell <davem@fdisolutions.com>
Fri, 8 Aug 2003 22:28:48 +0000 (23:28 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 9 Aug 2003 07:11:32 +0000 (07:11 +0000)
Message-ID: <20030808212848.GA2628@fdgroup.com>

p4raw-id: //depot/perl@20574

sv.c

diff --git a/sv.c b/sv.c
index 6fca92e..2c24d26 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5309,6 +5309,7 @@ Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv)
 #endif
     SvREFCNT(sv) = refcnt;
     SvFLAGS(nsv) |= SVTYPEMASK;                /* Mark as freed */
+    SvREFCNT(nsv) = 0;
     del_SV(nsv);
 }