mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
avoid some leaks and NULL pointer derefs
This commit is contained in:
parent
2fd64f1591
commit
dac60d4e5b
3 changed files with 8 additions and 1 deletions
|
|
@ -132,8 +132,10 @@ static int alloc_buffers(struct pw_mempool *pool,
|
|||
PW_MEMBLOCK_FLAG_MAP,
|
||||
SPA_DATA_MemFd,
|
||||
n_buffers * info.mem_size);
|
||||
if (m == NULL)
|
||||
if (m == NULL) {
|
||||
free(buffers);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
data = m->map->ptr;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue