This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PL_ofsgv is ref counted, so inc when duping
authorDavid Mitchell <davem@iabyn.com>
Sun, 19 Sep 2010 11:14:45 +0000 (12:14 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 20 Sep 2010 07:16:12 +0000 (08:16 +0100)
sv.c

diff --git a/sv.c b/sv.c
index 2930d04..b5de5ce 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12337,7 +12337,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_regex_pad = AvARRAY(PL_regex_padav);
 
     /* shortcuts to various I/O objects */
-    PL_ofsgv            = gv_dup(proto_perl->Iofsgv, param);
+    PL_ofsgv            = gv_dup_inc(proto_perl->Iofsgv, param);
     PL_stdingv         = gv_dup(proto_perl->Istdingv, param);
     PL_stderrgv                = gv_dup(proto_perl->Istderrgv, param);
     PL_defgv           = gv_dup(proto_perl->Idefgv, param);