mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
modules: unset buffer and size after alloc failure
Set the buffer_data to NULL and the size to 0 after we free the buffer in realloc failure to avoid problems later.
This commit is contained in:
parent
a4fb06073c
commit
ceb80723a9
1 changed files with 2 additions and 0 deletions
|
|
@ -144,6 +144,8 @@ static void *connection_ensure_size(struct pw_protocol_native_connection *conn,
|
|||
if (np == NULL) {
|
||||
res = -errno;
|
||||
free(buf->buffer_data);
|
||||
buf->buffer_data = NULL;
|
||||
buf->buffer_size = 0;
|
||||
buf->buffer_maxsize = 0;
|
||||
spa_hook_list_call(&conn->listener_list,
|
||||
struct pw_protocol_native_connection_events,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue