mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 06:28:13 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user