[gnome-keyring] [tests] Fix some minor memory leaks in unit tests.



commit 5a175e3c45883fc43a231f8144fdc8102a28c780
Author: Stef Walter <stef memberwebs com>
Date:   Tue Jul 21 00:30:22 2009 +0000

    [tests] Fix some minor memory leaks in unit tests.

 pkcs11/gck/tests/unit-test-data-asn1.c |    2 ++
 tests/gtest-helpers.c                  |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/gck/tests/unit-test-data-asn1.c b/pkcs11/gck/tests/unit-test-data-asn1.c
index 9d018df..c98b7ec 100644
--- a/pkcs11/gck/tests/unit-test-data-asn1.c
+++ b/pkcs11/gck/tests/unit-test-data-asn1.c
@@ -112,4 +112,6 @@ DEFINE_TEST(asn1_integers)
 	g_assert ("couldn't read mpi from asn1" && ret);
 	g_assert ("mpi returned is null" && mpt != NULL);
 	g_assert ("mpi is wrong number" && gcry_mpi_cmp (mpi, mpt) == 0);
+
+	g_free (data);
 }
diff --git a/tests/gtest-helpers.c b/tests/gtest-helpers.c
index 0bf09ba..88ac2c5 100644
--- a/tests/gtest-helpers.c
+++ b/tests/gtest-helpers.c
@@ -151,6 +151,8 @@ chdir_base_dir (char* argv0)
 			g_warning ("couldn't change directory to ..: %s",
 			           g_strerror (errno));
 	}
+
+	g_free (dir);
 }
 
 int



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]