]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix build break when OPENSSL_NO_SSLKEYLOGFILE is not defined
authorNeil Horman <nhorman@openssl.org>
Thu, 3 Oct 2024 15:41:46 +0000 (11:41 -0400)
committerMatt Caswell <matt@openssl.org>
Mon, 21 Oct 2024 10:34:35 +0000 (11:34 +0100)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25297)

ssl/ssl_lib.c

index 27150db61c84a0e435128d7aeda84beffe2fe7c8..2087331f586b25d8d398c790c83320f763e28372 100644 (file)
@@ -3893,12 +3893,11 @@ static long check_keylog_bio_free(BIO *b, int oper, const char *argp,
     /*
      * Note we _dont_ take the keylog_lock here
      * This is intentional, because we only free the keylog lock
-     * During SSL_CTX_free, in which we already posess the lock, so 
+     * During SSL_CTX_free, in which we already posess the lock, so
      * Theres no need to grab it again here
      */
     if (oper == BIO_CB_FREE)
         keylog_bio = NULL;
-out:
     return ret;
 }
 
@@ -4235,7 +4234,9 @@ SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
     return ret;
  err:
     SSL_CTX_free(ret);
+#ifndef OPENSSL_NO_SSLKEYLOG
     BIO_free(keylog_bio);
+#endif
     return NULL;
 }