]> sjero.net Git - wget/commitdiff
gnutls: deinit gnutls_x509_crt_t
authorTim Ruehsen <tim.ruehsen@gmx.de>
Tue, 28 Aug 2012 14:43:52 +0000 (16:43 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 2 Sep 2012 12:16:47 +0000 (14:16 +0200)
src/ChangeLog
src/gnutls.c

index 862ae30f1cd43d671208375095bcda928f7d29ef..d5b70f092ff8710490ff1afa700027844d23d38d 100644 (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.
index 32c6d174548ba2e3ffc69b9168648dd03a10506d..69b1cb276cec86e4b7935b5fe163d18268abfbe3 100644 (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);
    }