summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-07 11:52:14 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-07 11:52:14 +0200
commite5f85d6a4ce48b070840f0f2de2c1ca0e0f9fed5 (patch)
treea167ecdd445e00f9039a326f2a078f2996d9e115
parenta0777d78062405e606aa9d79e9caf0fac91a8fdf (diff)
remote-node: clean node on error
-rw-r--r--src/modules/module-client-node/remote-node.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c
index ae6730ae..8006369a 100644
--- a/src/modules/module-client-node/remote-node.c
+++ b/src/modules/module-client-node/remote-node.c
@@ -1191,7 +1191,7 @@ static struct pw_proxy *node_export(struct pw_core *core, void *object, bool do_
&node->properties->dict,
user_data_size + sizeof(struct node_data));
if (client_node == NULL)
- return NULL;
+ goto error;
data = pw_proxy_get_user_data(client_node);
data = SPA_MEMBER(data, user_data_size, struct node_data);
@@ -1234,6 +1234,11 @@ static struct pw_proxy *node_export(struct pw_core *core, void *object, bool do_
do_node_init(data);
return client_node;
+error:
+ if (do_free)
+ pw_impl_node_destroy(node);
+ return NULL;
+
}
struct pw_proxy *pw_core_node_export(struct pw_core *core,