fixes perl_clone of perl_clone
Artur Bergman [Thu, 12 Jul 2001 20:57:09 +0000 (22:57 +0200)]
Message-ID: <B773BFA4.236B%artur@contiller.se>

p4raw-id: //depot/perl@11325

sv.c

diff --git a/sv.c b/sv.c
index 9dabaff..2bf9ada 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9791,7 +9791,10 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        SV** regexen = AvARRAY((AV*)proto_perl->Iregex_padav);
        for(i = 0; i <= len; i++) {                             
            av_push(PL_regex_padav,
-                   newSViv((IV)re_dup((REGEXP *)SvIV(regexen[i]), param)));
+            SvREFCNT_inc(
+                        newSViv((IV)re_dup((REGEXP *)
+                             SvIVX(regexen[i]), param))
+                    ));
        }
     }
     PL_regex_pad = AvARRAY(PL_regex_padav);