From: Simon Josefsson Date: Thu, 5 Jun 2008 20:19:40 +0000 (+0200) Subject: Fix memory leaks. X-Git-Tag: gnutls_2_3_13~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88da52da22696a8ca4b25ad307fab825115aa88e;p=thirdparty%2Fgnutls.git Fix memory leaks. --- 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 (); }