This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
REFCNT botch in layer name cache hash.
authorNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 26 Mar 2001 20:30:48 +0000 (20:30 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 26 Mar 2001 20:30:48 +0000 (20:30 +0000)
p4raw-id: //depot/perlio@9364

perlio.c

index 50e3be1..194c14f 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -932,7 +932,7 @@ PerlIO_resolve_layers(pTHX_ const char *layers,const char *mode,int narg, SV **a
        if (handler)
         {
          def    = newAV();
-         av_push(def,handler);
+         av_push(def,SvREFCNT_inc(handler));
          av_push(def,&PL_sv_undef);
          incdef = 0;
         }