In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/57d92825d44f93fd84e0d8b25ef7b8e0da97134e?hp=418cfa3ab61043a017beeb293cb20e6034fedc63>

- Log -----------------------------------------------------------------
commit 57d92825d44f93fd84e0d8b25ef7b8e0da97134e
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Feb 10 19:03:29 2017 -0500

    Coverity #28930: unchecked return value
    
    Strangely, this was apparently found already in 2014, but it now
    (rightfully) showed up.  Coverity database tweak?
-----------------------------------------------------------------------

Summary of changes:
 doio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doio.c b/doio.c
index 10c4c3c6d8..becb19b080 100644
--- a/doio.c
+++ b/doio.c
@@ -761,7 +761,11 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char 
*mode, const char *oname,
 #if defined(HAS_FCNTL) && defined(F_SETFD)
                /* The dup trick has lost close-on-exec on ofd,
                  * and possibly any other flags, so restore them. */
-               fcntl(ofd,F_SETFD, fd_flags);
+               if (fcntl(ofd,F_SETFD, fd_flags) < 0) {
+                    if (dupfd >= 0)
+                        PerlLIO_close(dupfd);
+                    goto say_false;
+                }
 #endif
                 PerlLIO_close(dupfd);
            }

--
Perl5 Master Repository

Reply via email to