From: Jarkko Hietaniemi Date: Mon, 21 Apr 2014 22:54:54 +0000 (-0400) Subject: Fix for Coverity perl5 CID 29060: Pointer to local outside scope (RETURN_LOCAL) use_i... X-Git-Tag: v5.20.0-RC1~53 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/2a600bb8f7c0d6b36cb37c899b6c9e82537ec394?hp=53673d98756218ddd125311548c0f73c714722f7 Fix for Coverity perl5 CID 29060: Pointer to local outside scope (RETURN_LOCAL) use_invalid: Using mode, which points to an out-of-scope variable tmode. Duplicate the PerlIOBase_pushed call so that the tmode is in scope. --- diff --git a/perlio.c b/perlio.c index 0ae0a43..d4c43d0 100644 --- 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;