From ba78ba1e36c2b1c9feb50f9b29d25a7c7d71a1fd Mon Sep 17 00:00:00 2001 From: hniksic Date: Mon, 16 May 2005 13:52:28 -0700 Subject: [PATCH] [svn] Only free cert when necessary. --- src/openssl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index 93f00fc2..a16b9b79 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -491,11 +491,9 @@ ssl_check_certificate (int fd, const char *host) if (success) DEBUGP (("X509 certificate successfully verified and matches host %s\n", escnonprint (host))); + X509_free (cert); out: - if (cert) - X509_free (cert); - if (opt.check_cert && !success) logprintf (LOG_NOTQUIET, _("\ To connect to %s insecurely, use `--no-check-certificate'.\n"), -- 2.39.2