mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: avoid leaks in error path
When reading the properties failes, make sure to free the properties anyway.
This commit is contained in:
parent
5629885e41
commit
e3b0cc76a3
1 changed files with 8 additions and 5 deletions
|
|
@ -828,12 +828,15 @@ static int message_dump(enum spa_log_level level, struct message *m)
|
||||||
{
|
{
|
||||||
struct pw_properties *props = pw_properties_new(NULL, NULL);
|
struct pw_properties *props = pw_properties_new(NULL, NULL);
|
||||||
const struct spa_dict_item *it;
|
const struct spa_dict_item *it;
|
||||||
if ((res = read_props(m, props, false)) < 0)
|
res = read_props(m, props, false);
|
||||||
return res;
|
if (res >= 0) {
|
||||||
pw_log(level, "%u: props: n_items:%u", o, props->dict.n_items);
|
pw_log(level, "%u: props: n_items:%u", o, props->dict.n_items);
|
||||||
spa_dict_for_each(it, &props->dict)
|
spa_dict_for_each(it, &props->dict)
|
||||||
pw_log(level, " '%s': '%s'", it->key, it->value);
|
pw_log(level, " '%s': '%s'", it->key, it->value);
|
||||||
|
}
|
||||||
pw_properties_free(props);
|
pw_properties_free(props);
|
||||||
|
if (res < 0)
|
||||||
|
return res;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TAG_VOLUME:
|
case TAG_VOLUME:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue