mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pw-link: avoid memleak when proxy create fails
This commit is contained in:
parent
8da35df0bf
commit
c48c444566
1 changed files with 3 additions and 1 deletions
|
|
@ -427,8 +427,10 @@ static int create_link_target(struct data *data)
|
|||
tl->proxy = pw_core_create_object(data->core,
|
||||
"link-factory", PW_TYPE_INTERFACE_Link,
|
||||
PW_VERSION_LINK, &data->props->dict, 0);
|
||||
if (tl->proxy == NULL)
|
||||
if (tl->proxy == NULL) {
|
||||
free(tl);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
tl->data = data;
|
||||
tl->state = PW_LINK_STATE_INIT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue