]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix memory leaks.
authorSimon Josefsson <simon@josefsson.org>
Thu, 5 Jun 2008 20:19:40 +0000 (22:19 +0200)
committerSimon Josefsson <simon@josefsson.org>
Thu, 5 Jun 2008 20:19:40 +0000 (22:19 +0200)
tests/certder.c

index 50110735c83a3842f36cc4d94c7b39672ec42b8d..b39583404d78c786b959e61e761496ff7447acb1 100644 (file)
@@ -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 ();
 }