From: Rafael Garcia-Suarez Date: Sun, 8 Jun 2008 14:00:59 +0000 (+0000) Subject: Fix for bug [perl #54934] Attempt to free unreferenced scalar fiddling with the symbo... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a33563ff27918110ac4f876f12dae861e2d2fa2;p=p5sagit%2Fp5-mst-13.2.git 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 --- 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);