summaryrefslogtreecommitdiff
path: root/tests/certder.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-06-05 22:19:40 +0200
committerSimon Josefsson <simon@josefsson.org>2008-06-05 22:19:40 +0200
commit88da52da22696a8ca4b25ad307fab825115aa88e (patch)
tree5cc4f18949aff88d8a6fc58606248d9033b51644 /tests/certder.c
parent4b7a81cbc5a4da1838a110c13e7c4a7a5048db9d (diff)
downloadgnutls-88da52da22696a8ca4b25ad307fab825115aa88e.tar.gz
Fix memory leaks.
Diffstat (limited to 'tests/certder.c')
-rw-r--r--tests/certder.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/certder.c b/tests/certder.c
index 50110735c8..b39583404d 100644
--- a/tests/certder.c
+++ b/tests/certder.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Free Software Foundation
+ * Copyright (C) 2006, 2008 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -305,6 +305,8 @@ doit (void)
if (ret != GNUTLS_E_ASN1_DER_ERROR)
fail ("crt_import %d\n", ret);
+ gnutls_x509_crt_deinit (cert);
+
ret = gnutls_x509_crt_init (&cert);
if (ret < 0)
fail ("crt_init %d\n", ret);
@@ -313,6 +315,8 @@ doit (void)
if (ret != GNUTLS_E_ASN1_DER_ERROR)
fail ("crt2_import %d\n", ret);
+ gnutls_x509_crt_deinit (cert);
+
ret = gnutls_x509_crt_init (&cert);
if (ret < 0)
fail ("crt_init %d\n", ret);
@@ -324,4 +328,6 @@ doit (void)
success ("done\n");
gnutls_x509_crt_deinit (cert);
+
+ gnutls_global_deinit ();
}