summaryrefslogtreecommitdiff
path: root/tests/x509self.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-06-05 22:30:23 +0200
committerSimon Josefsson <simon@josefsson.org>2008-06-05 22:30:23 +0200
commite606cb0aa150b94655bff424f0f1e7273f901b19 (patch)
tree1d9778dd2011f5a32fffd7870c96fdb050f544ee /tests/x509self.c
parentfab0df76652f98aba1c6c516033b58b954d2adc9 (diff)
downloadgnutls-e606cb0aa150b94655bff424f0f1e7273f901b19.tar.gz
Fix memory leaks.
Diffstat (limited to 'tests/x509self.c')
-rw-r--r--tests/x509self.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/x509self.c b/tests/x509self.c
index 3f1bff3bae..d578ec5f9c 100644
--- a/tests/x509self.c
+++ b/tests/x509self.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -461,6 +461,8 @@ server (void)
gnutls_certificate_free_credentials (x509_cred);
+ gnutls_dh_params_deinit (dh_params);
+
gnutls_global_deinit ();
success ("server: finished\n");
@@ -470,10 +472,6 @@ server (void)
void
doit (void)
{
- server_start ();
- if (error_count)
- return;
-
child = fork ();
if (child < 0)
{
@@ -486,6 +484,10 @@ doit (void)
{
int status;
/* parent */
+ server_start ();
+ if (error_count)
+ return;
+
server ();
wait (&status);
}