diff options
-rw-r--r-- | src/tests/cmocka/test_child_common.c | 3 | ||||
-rw-r--r-- | src/tests/cwrap/test_become_user.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/cmocka/test_child_common.c b/src/tests/cmocka/test_child_common.c index 1a62a9099..f8fd762fe 100644 --- a/src/tests/cmocka/test_child_common.c +++ b/src/tests/cmocka/test_child_common.c @@ -45,6 +45,8 @@ static int child_test_setup(void **state) struct child_test_ctx *child_tctx; errno_t ret; + assert_true(leak_check_setup()); + check_leaks_push(global_talloc_context); child_tctx = talloc(global_talloc_context, struct child_test_ctx); assert_non_null(child_tctx); @@ -75,6 +77,7 @@ static int child_test_teardown(void **state) talloc_free(child_tctx); check_leaks_pop(global_talloc_context); + assert_true(leak_check_teardown()); return 0; } diff --git a/src/tests/cwrap/test_become_user.c b/src/tests/cwrap/test_become_user.c index b9e8a5c3b..48e16d4c7 100644 --- a/src/tests/cwrap/test_become_user.c +++ b/src/tests/cwrap/test_become_user.c @@ -78,6 +78,8 @@ void test_switch_user(void **state) struct sss_creds *saved_creds; struct sss_creds *saved_creds2 = NULL; + assert_true(leak_check_setup()); + check_leaks_push(global_talloc_context); tmp_ctx = talloc_new(global_talloc_context); assert_non_null(tmp_ctx); @@ -121,6 +123,7 @@ void test_switch_user(void **state) check_leaks_pop(tmp_ctx); talloc_free(tmp_ctx); check_leaks_pop(global_talloc_context); + assert_true(leak_check_teardown()); } int main(int argc, const char *argv[]) |