From 5a33563ff27918110ac4f876f12dae861e2d2fa2 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sun, 8 Jun 2008 14:00:59 +0000 Subject: [PATCH] Fix for bug [perl #54934] Attempt to free unreferenced scalar fiddling with the symbol table Keep the refcount of the globs generated by PerlIO::via balanced. p4raw-id: //depot/perl@34025 --- ext/PerlIO/via/via.pm | 2 +- ext/PerlIO/via/via.xs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/PerlIO/via/via.pm b/ext/PerlIO/via/via.pm index c425f12..5a96165 100644 --- a/ext/PerlIO/via/via.pm +++ b/ext/PerlIO/via/via.pm @@ -1,5 +1,5 @@ package PerlIO::via; -our $VERSION = '0.05'; +our $VERSION = '0.06'; use XSLoader (); XSLoader::load 'PerlIO::via'; 1; diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs index 3bc3cbb..5e6ddd3 100644 --- a/ext/PerlIO/via/via.xs +++ b/ext/PerlIO/via/via.xs @@ -89,7 +89,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags, if (!s->fh) { GV *gv = newGVgen(HvNAME_get(s->stash)); GvIOp(gv) = newIO(); - s->fh = newRV_noinc((SV *) gv); + s->fh = newRV((SV *) gv); s->io = GvIOp(gv); } IoIFP(s->io) = PerlIONext(f); -- 2.7.4