summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2012-01-25 13:29:29 +0100
committerSimon Josefsson <simon@josefsson.org>2012-01-25 13:36:35 +0100
commitf85b10210f68649957ddc285c79b91ee86fce4ba (patch)
tree8843d357fd8d6f1bf86beed2a02bf27d5f28dbdd /tests
parent82498bad27645c47222fa932a7caa2e95747980a (diff)
downloadgnutls-f85b10210f68649957ddc285c79b91ee86fce4ba.tar.gz
Fix mem leaks.
Diffstat (limited to 'tests')
-rw-r--r--tests/infoaccess.c2
-rw-r--r--tests/mpi.c4
-rw-r--r--tests/openpgp-auth.c2
-rw-r--r--tests/openpgp-auth2.c2
-rw-r--r--tests/openssl.c2
-rw-r--r--tests/pkcs12_encode.c2
-rw-r--r--tests/rng-fork.c2
7 files changed, 13 insertions, 3 deletions
diff --git a/tests/infoaccess.c b/tests/infoaccess.c
index 073e54f21d..910e1dd783 100644
--- a/tests/infoaccess.c
+++ b/tests/infoaccess.c
@@ -231,6 +231,8 @@ doit (void)
}
gnutls_free (data.data);
+ gnutls_x509_crt_deinit (crt);
+
gnutls_global_deinit ();
}
diff --git a/tests/mpi.c b/tests/mpi.c
index 70b3ba7080..ccc3c0c74f 100644
--- a/tests/mpi.c
+++ b/tests/mpi.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2007-2012 Free Software Foundation, Inc.
*
- * Author: Simon Josefsson
+ * Author: Nikos Mavrogiannopoulos, Simon Josefsson
*
* This file is part of GnuTLS.
*
@@ -83,5 +83,7 @@ doit (void)
_gnutls_mpi_release (&n3);
_gnutls_mpi_release (&n4);
+ gnutls_global_deinit ();
+
if (debug) success ("mpi ops ok\n");
}
diff --git a/tests/openpgp-auth.c b/tests/openpgp-auth.c
index e71bee8a31..97879166c1 100644
--- a/tests/openpgp-auth.c
+++ b/tests/openpgp-auth.c
@@ -266,6 +266,8 @@ doit ()
}
}
+
+ gnutls_global_deinit ();
}
#else
void
diff --git a/tests/openpgp-auth2.c b/tests/openpgp-auth2.c
index e884ca8115..d87f79f94f 100644
--- a/tests/openpgp-auth2.c
+++ b/tests/openpgp-auth2.c
@@ -249,6 +249,8 @@ doit ()
else
fail ("child failed: %d\n", status);
}
+
+ gnutls_global_deinit ();
}
#else
void
diff --git a/tests/openssl.c b/tests/openssl.c
index 2a31180dd7..a11f9aa5ed 100644
--- a/tests/openssl.c
+++ b/tests/openssl.c
@@ -54,4 +54,6 @@ doit (void)
}
else if (debug)
success ("MD5 OK\n");
+
+ gnutls_global_deinit ();
}
diff --git a/tests/pkcs12_encode.c b/tests/pkcs12_encode.c
index dc13fc9d2d..3d9e8e6210 100644
--- a/tests/pkcs12_encode.c
+++ b/tests/pkcs12_encode.c
@@ -89,7 +89,6 @@ doit (void)
if (ret < 0)
error (EXIT_FAILURE, 0, "gnutls_global_init %d", ret);
- gnutls_global_init ();
gnutls_global_set_log_function (tls_log_func);
if (debug)
gnutls_global_set_log_level (4711);
@@ -179,5 +178,4 @@ doit (void)
gnutls_x509_crt_deinit (client);
gnutls_x509_crt_deinit (ca);
gnutls_global_deinit ();
-
}
diff --git a/tests/rng-fork.c b/tests/rng-fork.c
index 4546007d1e..a977e1de56 100644
--- a/tests/rng-fork.c
+++ b/tests/rng-fork.c
@@ -100,6 +100,8 @@ doit (void)
if(debug)
success("success\n");
}
+
+ gnutls_global_deinit ();
}
#else
void