From 4b09d2b4d3958b58b020c1ae21fcd932e1eb6c37 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 20 Mar 2013 22:20:25 +0100 Subject: Fix memory leaks reported by 'make leakcheck' --- p11-kit/tests/pin-test.c | 1 - p11-kit/tests/test-iter.c | 1 + p11-kit/tests/test-modules.c | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'p11-kit/tests') diff --git a/p11-kit/tests/pin-test.c b/p11-kit/tests/pin-test.c index 758acf4..dd020bc 100644 --- a/p11-kit/tests/pin-test.c +++ b/p11-kit/tests/pin-test.c @@ -109,7 +109,6 @@ test_pin_read (CuTest *tc) p11_kit_pin_unregister_callback ("/the/pin_source", callback_one, &data); - p11_kit_pin_ref (pin); p11_kit_pin_unref (pin); } diff --git a/p11-kit/tests/test-iter.c b/p11-kit/tests/test-iter.c index 81aa06c..ccfce2c 100644 --- a/p11-kit/tests/test-iter.c +++ b/p11-kit/tests/test-iter.c @@ -983,6 +983,7 @@ test_load_attributes_none (CuTest *tc) attrs = p11_attrs_buildn (NULL, NULL, 0); rv = p11_kit_iter_load_attributes (iter, attrs, 0); CuAssertTrue (tc, rv == CKR_OK); + p11_attrs_free (attrs); } CuAssertTrue (tc, rv == CKR_CANCEL); diff --git a/p11-kit/tests/test-modules.c b/p11-kit/tests/test-modules.c index 5bdbaa4..3f0e4e0 100644 --- a/p11-kit/tests/test-modules.c +++ b/p11-kit/tests/test-modules.c @@ -96,6 +96,8 @@ test_no_duplicates (CuTest *tc) CuAssert (tc, "shouldn't be reached", 0); if (!p11_dict_set (paths, path, "")) CuAssert (tc, "shouldn't be reached", 0); + + free (path); } p11_dict_free (paths); -- cgit v1.1