mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pw-dump: fix string memory leak on error
`object::type` was not cleared in the error path. Fix that by calling `object_destroy()`, which takes care of it.
This commit is contained in:
parent
bb54e32e8a
commit
3a912cbbb3
1 changed files with 2 additions and 3 deletions
|
|
@ -1329,6 +1329,7 @@ static void registry_event_global(void *data, uint32_t id,
|
|||
spa_list_init(&o->param_list);
|
||||
spa_list_init(&o->pending_list);
|
||||
spa_list_init(&o->data_list);
|
||||
spa_list_append(&d->object_list, &o->link);
|
||||
|
||||
o->class = find_class(type, version);
|
||||
if (o->class != NULL) {
|
||||
|
|
@ -1350,15 +1351,13 @@ static void registry_event_global(void *data, uint32_t id,
|
|||
} else {
|
||||
o->changed++;
|
||||
}
|
||||
spa_list_append(&d->object_list, &o->link);
|
||||
|
||||
core_sync(d);
|
||||
return;
|
||||
|
||||
bind_failed:
|
||||
pw_log_error("can't bind object for %u %s/%d: %m", id, type, version);
|
||||
pw_properties_free(o->props);
|
||||
free(o);
|
||||
object_destroy(o);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue