gnutls: deinit gnutls_x509_crt_t

This commit is contained in:
Tim Ruehsen 2012-08-28 16:43:52 +02:00 committed by Giuseppe Scrivano
parent 798f554773
commit b718128b4f
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2012-08-28 Tim Ruehsen <tim.ruehsen@gmx.de>
* gnutls.c (ssl_check_certificate): deinit gnutls_x509_crt_t.
2012-07-07 Giuseppe Scrivano <gscrivano@gnu.org>
* html-url.c (cleanup_html_url): Remove "static" modifier.

View File

@ -515,7 +515,7 @@ ssl_check_certificate (int fd, const char *host)
{
logprintf (LOG_NOTQUIET, _("No certificate found\n"));
success = false;
goto out;
goto crt_deinit;
}
err = gnutls_x509_crt_import (cert, cert_list, GNUTLS_X509_FMT_DER);
if (err < 0)
@ -523,7 +523,7 @@ ssl_check_certificate (int fd, const char *host)
logprintf (LOG_NOTQUIET, _("Error parsing certificate: %s\n"),
gnutls_strerror (err));
success = false;
goto out;
goto crt_deinit;
}
if (now < gnutls_x509_crt_get_activation_time (cert))
{
@ -542,6 +542,7 @@ ssl_check_certificate (int fd, const char *host)
quote (host));
success = false;
}
crt_deinit:
gnutls_x509_crt_deinit (cert);
}