mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: tools: spa-inspect: clear and free handles
Call the handle's `clear()` method after it has been inspected, and free the allocated storage for the handle.
This commit is contained in:
parent
3cb5fab176
commit
1a21da9898
1 changed files with 7 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
|
|||
if ((res =
|
||||
spa_handle_factory_init(factory, handle, NULL, data->support, data->n_support)) < 0) {
|
||||
printf("can't make factory instance: %d\n", res);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("factory instance:\n");
|
||||
|
|
@ -256,6 +256,12 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
|
|||
else
|
||||
printf("skipping unknown interface\n");
|
||||
}
|
||||
|
||||
if ((res = spa_handle_clear(handle)) < 0)
|
||||
printf("failed to clear handle: %s\n", spa_strerror(res));
|
||||
|
||||
out:
|
||||
free(handle);
|
||||
}
|
||||
|
||||
static const struct spa_loop_methods impl_loop = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue