mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
Fix some leaks in error cases
This commit is contained in:
parent
8669fd03a6
commit
c2028a1695
9 changed files with 43 additions and 22 deletions
|
|
@ -210,8 +210,10 @@ pw_client_node0_transport_new(struct pw_context *context,
|
|||
PW_MEMBLOCK_FLAG_MAP |
|
||||
PW_MEMBLOCK_FLAG_SEAL,
|
||||
SPA_DATA_MemFd, area_get_size(&area));
|
||||
if (impl->mem == NULL)
|
||||
if (impl->mem == NULL) {
|
||||
free(impl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(impl->mem->map->ptr, &area, sizeof(struct pw_client_node0_area));
|
||||
transport_setup_area(impl->mem->map->ptr, trans);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue