diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-06-05 22:19:40 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-06-05 22:19:40 +0200 |
commit | 88da52da22696a8ca4b25ad307fab825115aa88e (patch) | |
tree | 5cc4f18949aff88d8a6fc58606248d9033b51644 /tests/certder.c | |
parent | 4b7a81cbc5a4da1838a110c13e7c4a7a5048db9d (diff) | |
download | gnutls-88da52da22696a8ca4b25ad307fab825115aa88e.tar.gz |
Fix memory leaks.
Diffstat (limited to 'tests/certder.c')
-rw-r--r-- | tests/certder.c | 8 |
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 (); } |