[ PATCH] Re: strange destruction problem on VMS
Dave Mitchell [Fri, 8 Aug 2003 22:28:48 +0000 (23:28 +0100)]
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);
 }