Fix for bug [perl #54934] Attempt to free unreferenced scalar fiddling with the symbo...
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 8 Jun 2008 14:00:59 +0000 (14:00 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 8 Jun 2008 14:00:59 +0000 (14:00 +0000)
Keep the refcount of the globs generated by PerlIO::via balanced.

p4raw-id: //depot/perl@34025

ext/PerlIO/via/via.pm
ext/PerlIO/via/via.xs

index c425f12..5a96165 100644 (file)
@@ -1,5 +1,5 @@
 package PerlIO::via;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 use XSLoader ();
 XSLoader::load 'PerlIO::via';
 1;
index 3bc3cbb..5e6ddd3 100644 (file)
@@ -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);