mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
tests: cleanup correctly to avoid leaks
This commit is contained in:
parent
c2ba66bef6
commit
9c072832f0
1 changed files with 2 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ static void test_create(void)
|
||||||
spa_assert_se(context != NULL);
|
spa_assert_se(context != NULL);
|
||||||
core = pw_context_connect(context, NULL, 0);
|
core = pw_context_connect(context, NULL, 0);
|
||||||
if (core == NULL && errno == EHOSTDOWN)
|
if (core == NULL && errno == EHOSTDOWN)
|
||||||
return;
|
goto cleanup;
|
||||||
spa_assert_se(core != NULL);
|
spa_assert_se(core != NULL);
|
||||||
|
|
||||||
spa_zero(info);
|
spa_zero(info);
|
||||||
|
|
@ -155,6 +155,7 @@ static void test_create(void)
|
||||||
pw_proxy_destroy((struct pw_proxy*)info.sec);
|
pw_proxy_destroy((struct pw_proxy*)info.sec);
|
||||||
pw_proxy_destroy((struct pw_proxy*)info.registry);
|
pw_proxy_destroy((struct pw_proxy*)info.registry);
|
||||||
|
|
||||||
|
cleanup:
|
||||||
pw_context_destroy(context);
|
pw_context_destroy(context);
|
||||||
pw_main_loop_destroy(loop);
|
pw_main_loop_destroy(loop);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue