[gnome-keyring] test-data-asn1: Fix memory leaks in test_asn1_integers



commit 298d910cfe2e468ad0005646e8a00b5fc8116e10
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed Sep 17 11:55:10 2014 +0200

    test-data-asn1: Fix memory leaks in test_asn1_integers
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738508

 pkcs11/gkm/test-data-asn1.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/gkm/test-data-asn1.c b/pkcs11/gkm/test-data-asn1.c
index 696b4a4..f5a4db4 100644
--- a/pkcs11/gkm/test-data-asn1.c
+++ b/pkcs11/gkm/test-data-asn1.c
@@ -99,11 +99,14 @@ test_asn1_integers (Test *test, gconstpointer unused)
        g_assert (asn != NULL);
 
        ret = gkm_data_asn1_read_mpi (egg_asn1x_node (asn, "mpi", NULL), &mpt);
+       egg_asn1x_destroy (asn);
        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_bytes_unref (data);
+       gcry_mpi_release (mpi);
+       gcry_mpi_release (mpt);
 }
 
 int


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