From 88a34a6fd316ba698c46283b13d785bd3443a412 Mon Sep 17 00:00:00 2001 From: Tim Ruehsen Date: Tue, 28 Aug 2012 16:43:52 +0200 Subject: [PATCH 2/4] deinit gnutls_x509_crt_t --- src/gnutls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gnutls.c b/src/gnutls.c index 32c6d17..69b1cb2 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -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); } -- 1.7.10.4