gnutls-devel
[Top][All Lists]
Advanced

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

Re: GnuTLS 2.9.3


From: Daiki Ueno
Subject: Re: GnuTLS 2.9.3
Date: Thu, 20 Aug 2009 10:33:00 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>>>>> In <address@hidden> 
>>>>>   Simon Josefsson <address@hidden> wrote:
> * Version 2.9.3 (released 2009-08-19)

> ** libgnutls: Support for TLS tickets was contributed by Daiki Ueno.

Thanks for the new release!

Now I run make check and found several memleaks.  One is in
cdk_keydb_get_pk, and others are in tests (including session ticket
test...sorry).

Here is a patch to fix them.

diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index a4807de..100ac67 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -616,6 +616,7 @@ GNUTLS_PRIVATE {
     _gnutls_mpi_ops;
     _gnutls_mpi_randomize;
     _gnutls_mpi_log;
+    _gnutls_mpi_release;
     # Internal symbols needed by tests/pkcs12_s2k:
     _gnutls_pkcs12_string_to_key;
     _gnutls_bin2hex;
diff --git a/lib/opencdk/keydb.c b/lib/opencdk/keydb.c
index 971e693..314fefe 100644
--- a/lib/opencdk/keydb.c
+++ b/lib/opencdk/keydb.c
@@ -1422,14 +1422,13 @@ cdk_keydb_get_pk (cdk_keydb_hd_t hd, u32 * keyid, 
cdk_pubkey_t * r_pk)
       return rc;
     }
   rc = cdk_keydb_search (st, hd, &knode);
+  cdk_keydb_search_release (st);
   if (rc)
     {
       gnutls_assert ();
       return rc;
     }
 
-  cdk_keydb_search_release (st);
-
   node = keydb_find_bykeyid (knode, keyid, s_type);
   if (!node)
     {
diff --git a/tests/dn2.c b/tests/dn2.c
index 83bd132..6ef8579 100644
--- a/tests/dn2.c
+++ b/tests/dn2.c
@@ -100,6 +100,7 @@ doit (void)
 
   gnutls_x509_crt_deinit (cert);
   gnutls_global_deinit ();
+  gnutls_free (out.data);
 
   success ("done\n");
 }
diff --git a/tests/mpi.c b/tests/mpi.c
index e5a4a28..e37f273 100644
--- a/tests/mpi.c
+++ b/tests/mpi.c
@@ -77,5 +77,10 @@ doit (void)
   if (_gnutls_mpi_cmp_ui (n4, 0) != 0 && _gnutls_mpi_cmp_ui (n4, 1) != 0)
     fail ("mpi_cmp_ui failed\n");
 
+  _gnutls_mpi_release (&n1);
+  _gnutls_mpi_release (&n2);
+  _gnutls_mpi_release (&n3);
+  _gnutls_mpi_release (&n4);
+
   success ("mpi ops ok\n");
 }
diff --git a/tests/resume.c b/tests/resume.c
index e4d7a2a..9c23940 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -216,7 +216,7 @@ client (struct params_res *params)
 
 /* These are global */
 gnutls_anon_server_credentials_t anoncred;
-gnutls_datum_t session_ticket_key;
+gnutls_datum_t session_ticket_key = { NULL, 0 };
 
 static gnutls_session_t
 initialize_tls_session (struct params_res *params)
@@ -421,6 +421,8 @@ server (struct params_res *params)
       wrap_db_deinit ();
     }
 
+  gnutls_free (session_ticket_key.data);
+
   success ("server: finished\n");
 }
 
Regards,
-- 
Daiki Ueno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]