Fix for Coverity perl5 CID 29060: Pointer to local outside scope (RETURN_LOCAL) use_i...
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 21 Apr 2014 22:54:54 +0000 (18:54 -0400)
committerTony Cook <tony@develop-help.com>
Tue, 29 Apr 2014 23:58:53 +0000 (09:58 +1000)
Duplicate the PerlIOBase_pushed call so that the tmode is in scope.

perlio.c

index 0ae0a43..d4c43d0 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -2905,6 +2905,7 @@ PerlIOStdio_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab
                PerlIOSelf(f, PerlIOStdio)->stdio = stdio;
                /* We never call down so do any pending stuff now */
                PerlIO_flush(PerlIONext(f));
+                return PerlIOBase_pushed(aTHX_ f, mode, arg, tab);
            }
            else {
                return -1;