pw-cli: free properties in create_ functions

This commit is contained in:
Wim Taymans 2021-04-19 16:37:05 +02:00
parent 50bae0a209
commit 66e37f6bb7

View file

@ -1293,6 +1293,9 @@ static bool do_create_device(struct data *data, const char *cmd, char *args, cha
props ? &props->dict : NULL, props ? &props->dict : NULL,
sizeof(struct proxy_data)); sizeof(struct proxy_data));
if (props)
pw_properties_free(props);
pd = pw_proxy_get_user_data(proxy); pd = pw_proxy_get_user_data(proxy);
pd->rd = rd; pd->rd = rd;
pd->proxy = proxy; pd->proxy = proxy;
@ -1330,6 +1333,9 @@ static bool do_create_node(struct data *data, const char *cmd, char *args, char
props ? &props->dict : NULL, props ? &props->dict : NULL,
sizeof(struct proxy_data)); sizeof(struct proxy_data));
if (props)
pw_properties_free(props);
pd = pw_proxy_get_user_data(proxy); pd = pw_proxy_get_user_data(proxy);
pd->rd = rd; pd->rd = rd;
pd->proxy = proxy; pd->proxy = proxy;
@ -1399,6 +1405,9 @@ static bool do_create_link(struct data *data, const char *cmd, char *args, char
props ? &props->dict : NULL, props ? &props->dict : NULL,
sizeof(struct proxy_data)); sizeof(struct proxy_data));
if (props)
pw_properties_free(props);
pd = pw_proxy_get_user_data(proxy); pd = pw_proxy_get_user_data(proxy);
pd->rd = rd; pd->rd = rd;
pd->proxy = proxy; pd->proxy = proxy;