fifo.c: Eliminate logically dead code (Coverity 1437635)

This commit is contained in:
Joel Sherrill
2019-03-13 10:06:45 -05:00
parent 90232bcf45
commit 11eb818e88

View File

@@ -149,18 +149,15 @@ static int pipe_new(
pipe = *pipep; pipe = *pipep;
if (pipe == NULL) { if (pipe == NULL) {
err = pipe_alloc(&pipe); err = pipe_alloc(&pipe);
if (err) if (err) {
goto out; pipe_unlock();
return err;
}
} }
PIPE_LOCK(pipe); PIPE_LOCK(pipe);
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe; *pipep = pipe;
}
out: out:
pipe_unlock(); pipe_unlock();