Merge pull request #15009 from fjmolinas/pr_pipe_null_deref

sys/pipe/pipe_dynamic: fix possible null pointer dereference
This commit is contained in:
Koen Zandberg 2020-09-11 12:29:49 +02:00 committed by GitHub
commit 23fb19ad8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,9 @@ pipe_t *pipe_malloc(unsigned size)
if (m_pipe) {
ringbuffer_init(&m_pipe->rb, m_pipe->buffer, size);
pipe_init(&m_pipe->pipe, &m_pipe->rb, free);
return &m_pipe->pipe;
}
return &m_pipe->pipe;
return NULL;
}
void pipe_free(pipe_t *rp)