mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-device-factory: clean up properties in all cases
This commit is contained in:
parent
e98931023f
commit
3005d33113
1 changed files with 5 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ error_properties:
|
||||||
if (resource)
|
if (resource)
|
||||||
pw_resource_errorf_id(resource, new_id, res,
|
pw_resource_errorf_id(resource, new_id, res,
|
||||||
"usage: "FACTORY_USAGE);
|
"usage: "FACTORY_USAGE);
|
||||||
goto error_exit;
|
goto error_exit_cleanup;
|
||||||
error_device:
|
error_device:
|
||||||
pw_log_debug("can't create device %s: %s", factory_name, spa_strerror(res));
|
pw_log_debug("can't create device %s: %s", factory_name, spa_strerror(res));
|
||||||
if (resource)
|
if (resource)
|
||||||
|
|
@ -178,6 +178,10 @@ error_bind:
|
||||||
pw_resource_errorf_id(resource, new_id, res, "can't bind device");
|
pw_resource_errorf_id(resource, new_id, res, "can't bind device");
|
||||||
pw_impl_device_destroy(device);
|
pw_impl_device_destroy(device);
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
|
error_exit_cleanup:
|
||||||
|
if (properties)
|
||||||
|
pw_properties_free(properties);
|
||||||
error_exit:
|
error_exit:
|
||||||
free(factory_name);
|
free(factory_name);
|
||||||
errno = -res;
|
errno = -res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue