From 5d77950b4cc2d86ce6d0919faa74883d9a5b2508 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 24 Nov 2015 19:17:06 +0100 Subject: [PATCH] tests: fix leak in test test16_test_get_issuer --- tests/basic_tests.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/basic_tests.c b/tests/basic_tests.c index 5ac07de3..4a3ead05 100644 --- a/tests/basic_tests.c +++ b/tests/basic_tests.c @@ -2087,10 +2087,16 @@ START_TEST(test16_test_get_issuer) { char *content = NULL; size_t len = 0; + char *issuer = NULL; + char *in_response_to = NULL; g_file_get_contents(TESTSDATADIR "/response-1", &content, &len, NULL); - check_str_equals(lasso_profile_get_issuer(content), "gefssstg"); - check_str_equals(lasso_profile_get_in_response_to(content), "xx"); + issuer = lasso_profile_get_issuer(content); + check_str_equals(issuer, "gefssstg"); + lasso_release_string(issuer); + in_response_to = lasso_profile_get_in_response_to(content); + check_str_equals(in_response_to, "xx"); + lasso_release_string(in_response_to); } END_TEST