mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-15 04:12:29 +00: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
|
@ -232,7 +232,7 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
|
||||||
if ((res =
|
if ((res =
|
||||||
spa_handle_factory_init(factory, handle, NULL, data->support, data->n_support)) < 0) {
|
spa_handle_factory_init(factory, handle, NULL, data->support, data->n_support)) < 0) {
|
||||||
printf("can't make factory instance: %d\n", res);
|
printf("can't make factory instance: %d\n", res);
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("factory instance:\n");
|
printf("factory instance:\n");
|
||||||
|
@ -256,6 +256,12 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory *
|
||||||
else
|
else
|
||||||
printf("skipping unknown interface\n");
|
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 = {
|
static const struct spa_loop_methods impl_loop = {
|
||||||
|
|
Loading…
Reference in a new issue