1
0
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:
Francisco Molina 2020-09-11 11:19:58 +02:00
parent 48e5bbc8ba
commit ee379eb535
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8

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)