From be1d4940a36fc3068d7ff3cd48b7adc390a4f14e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 24 Nov 2022 09:40:14 +0100 Subject: [PATCH] protocol-native: initialize fields Set some of the fields to default values. Fixes #2852 --- src/modules/module-client-node/protocol-native.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/module-client-node/protocol-native.c b/src/modules/module-client-node/protocol-native.c index 0b640b251..dd516928e 100644 --- a/src/modules/module-client-node/protocol-native.c +++ b/src/modules/module-client-node/protocol-native.c @@ -556,6 +556,8 @@ static int client_node_demarshal_port_use_buffers(void *data, const struct pw_pr SPA_POD_Id(&m->type), SPA_POD_Int(&m->size), NULL) < 0) return -EINVAL; + + m->data = NULL; } if (spa_pod_parser_get(&prs, SPA_POD_Int(&buf->n_datas), NULL) < 0) @@ -576,7 +578,9 @@ static int client_node_demarshal_port_use_buffers(void *data, const struct pw_pr SPA_POD_Int(&d->maxsize), NULL) < 0) return -EINVAL; + d->fd = -1; d->data = SPA_UINT32_TO_PTR(data_id); + d->chunk = NULL; } } pw_proxy_notify(proxy, struct pw_client_node_events, port_use_buffers, 0,