Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fileno() was failing when passed a NULL. I'm guessing that we don't r…

…eally need to increase the refcount on a NULL fd.
  • Loading branch information...
commit 40596bc538f0e2be42b50d80f46887e76a4a3b33 1 parent 86bddcb
Steve Peters smpeters authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 perlio.c
4 perlio.c
View
@@ -3033,7 +3033,9 @@ PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
stdio = PerlSIO_fdopen(fd, PerlIO_modestr(o,mode));
set_this:
PerlIOSelf(f, PerlIOStdio)->stdio = stdio;
- PerlIOUnix_refcnt_inc(fileno(stdio));
+ if(stdio) {
+ PerlIOUnix_refcnt_inc(fileno(stdio));
+ }
}
return f;
}
Please sign in to comment.
Something went wrong with that request. Please try again.