]> sjero.net Git - wget/commitdiff
[svn] Only free cert when necessary.
authorhniksic <devnull@localhost>
Mon, 16 May 2005 20:52:28 +0000 (13:52 -0700)
committerhniksic <devnull@localhost>
Mon, 16 May 2005 20:52:28 +0000 (13:52 -0700)
src/openssl.c

index 93f00fc218ae7485379b6bf5f8b78c92820dd03c..a16b9b79df9ec8ed0b64f10cc6a595addc0794ef 100644 (file)
@@ -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"),