diff options
author | Daiki Ueno <ueno@unixuser.org> | 2009-08-20 10:33:00 +0900 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-08-20 10:04:51 +0200 |
commit | 65fa3349f14a85fd04dbae15afe16731aad2331c (patch) | |
tree | 131fe4cff97e3e739698e7c457072700bfb6ebdf | |
parent | 41090bcba5b98add10021590adbe4c8542f33850 (diff) | |
download | gnutls-65fa3349f14a85fd04dbae15afe16731aad2331c.tar.gz |
Fix memleaks.
Signed-off-by: Simon Josefsson <simon@josefsson.org>
-rw-r--r-- | lib/libgnutls.map | 1 | ||||
-rw-r--r-- | lib/opencdk/keydb.c | 3 | ||||
-rw-r--r-- | tests/dn2.c | 1 | ||||
-rw-r--r-- | tests/mpi.c | 5 | ||||
-rw-r--r-- | tests/resume.c | 4 |
5 files changed, 11 insertions, 3 deletions
diff --git a/lib/libgnutls.map b/lib/libgnutls.map index a4807dee18..100ac679f0 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 971e693819..314fefedc4 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 83bd13243d..6ef8579e62 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 e5a4a28946..e37f273dd3 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 e4d7a2ab80..9c239408bf 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"); } |