]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ssl: Remove a useless variable from ssl_gen_x509()
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 23 Feb 2026 09:47:15 +0000 (10:47 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 23 Feb 2026 09:47:15 +0000 (10:47 +0100)
This function was recently created by moving code from acme_gen_tmp_x509()
(in acme.c) to ssl_gencrt.c (ssl_gen_x509()). The <ctmp> variable was
initialized and then freed without ever being used. This was already the
case in the original acme_gen_tmp_x509() function.

This patch removes these useless statements.

Reported in GH #3284

src/ssl_gencert.c

index 50e3e9c8828c00bcb8c3bae28f6bf51e8bd72e07..ef6922d356dd0652154fb86eb103ba2a4d11d694 100644 (file)
@@ -524,7 +524,6 @@ X509 *ssl_gen_x509(EVP_PKEY *pkey)
        X509         *newcrt  = NULL;
        X509_NAME    *name;
        const EVP_MD *digest = NULL;
-       CONF         *ctmp    = NULL;
        int           key_type;
 
        /* Create the certificate */
@@ -581,7 +580,6 @@ X509 *ssl_gen_x509(EVP_PKEY *pkey)
        return newcrt;
 
 mkcert_error:
-       if (ctmp) NCONF_free(ctmp);
        if (newcrt)  X509_free(newcrt);
        return NULL;