mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/pipe/pipe_dynamic: fix possible null pointer dereference
This commit is contained in:
parent
48e5bbc8ba
commit
ee379eb535
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user