Fix open(FH,"Via(Foo)","NonExistant") and other cases when
[p5sagit/p5-mst-13.2.git] / perlio.c
index 925920d..3cce842 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -2564,8 +2564,11 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
                        s->stdio = stdio;
                        PerlIOUnix_refcnt_inc(fileno(s->stdio));
                    }
+                   return f;
+               }
+               else {
+                   return NULL;
                }
-               return f;
            }
        }
        if (fd >= 0) {
@@ -4637,3 +4640,4 @@ PerlIO_sprintf(char *s, int n, const char *fmt, ...)
 
 
 
+