mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
spa-device: fix leak of properties in error case
This commit is contained in:
parent
d3748ef254
commit
d871adbd4d
1 changed files with 3 additions and 0 deletions
|
|
@ -147,6 +147,7 @@ error_interface:
|
||||||
pw_log_error("can't get device interface %d", res);
|
pw_log_error("can't get device interface %d", res);
|
||||||
goto error_exit_unload;
|
goto error_exit_unload;
|
||||||
error_device:
|
error_device:
|
||||||
|
properties = NULL;
|
||||||
res = -errno;
|
res = -errno;
|
||||||
pw_log_error("can't create device: %m");
|
pw_log_error("can't create device: %m");
|
||||||
goto error_exit_unload;
|
goto error_exit_unload;
|
||||||
|
|
@ -155,5 +156,7 @@ error_exit_unload:
|
||||||
pw_unload_spa_handle(handle);
|
pw_unload_spa_handle(handle);
|
||||||
error_exit:
|
error_exit:
|
||||||
errno = -res;
|
errno = -res;
|
||||||
|
if (properties)
|
||||||
|
pw_properties_free(properties);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue