summaryrefslogtreecommitdiff
path: root/tools/tests/test-pem.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-20 22:20:25 +0100
committerStef Walter <stefw@gnome.org>2013-03-20 22:22:30 +0100
commit4b09d2b4d3958b58b020c1ae21fcd932e1eb6c37 (patch)
treeabba9eb25d2d7d4c9804ba56741e08e40b0fe417 /tools/tests/test-pem.c
parent57d8f36a6cfbde5a9a783f11f2b75f19005c23e1 (diff)
Fix memory leaks reported by 'make leakcheck'
Diffstat (limited to 'tools/tests/test-pem.c')
-rw-r--r--tools/tests/test-pem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tests/test-pem.c b/tools/tests/test-pem.c
index 3be8fee..5c19455 100644
--- a/tools/tests/test-pem.c
+++ b/tools/tests/test-pem.c
@@ -135,6 +135,7 @@ test_file (CuTest *tc)
test_check_file (tc, test.directory, "extract.pem", SRCDIR "/files/cacert3.pem");
+ free (test.ex.destination);
teardown (tc);
}
@@ -160,6 +161,7 @@ test_file_multiple (CuTest *tc)
test_check_file (tc, test.directory, "extract.pem", SRCDIR "/files/cacert3-twice.pem");
+ free (test.ex.destination);
teardown (tc);
}
@@ -174,9 +176,6 @@ test_file_without (CuTest *tc)
p11_kit_iter_add_filter (test.iter, certificate_filter, 1);
p11_kit_iter_begin_with (test.iter, &test.module, 0, 0);
- if (asprintf (&test.ex.destination, "%s/%s", test.directory, "extract.cer") < 0)
- assert_not_reached ();
-
if (asprintf (&test.ex.destination, "%s/%s", test.directory, "extract.pem") < 0)
assert_not_reached ();
@@ -185,6 +184,7 @@ test_file_without (CuTest *tc)
test_check_data (tc, test.directory, "extract.pem", "", 0);
+ free (test.ex.destination);
teardown (tc);
}