pipe/fifo.c: NULL dereference flagged by Coverity ID 1063889

It does not appear that this is possible so adding an assert.
This commit is contained in:
Joel Sherrill
2014-11-21 13:13:22 -06:00
parent e8abdfb874
commit abf3892c1a
+2 -1
View File
@@ -212,6 +212,7 @@ static int pipe_new(
pipe_control_t *pipe;
int err = 0;
_Assert( pipep );
err = pipe_lock();
if (err)
return err;
@@ -223,7 +224,7 @@ static int pipe_new(
goto out;
}
if (! PIPE_LOCK(pipe))
if (!PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {