]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Copy haproxy fields to client pool
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 23 May 2025 18:09:02 +0000 (21:09 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 27 May 2025 07:46:35 +0000 (07:46 +0000)
They are stack allocated in lib-master now.

src/login-common/client-common.c

index 3aaddb7ed3285341d746e7cfbe12dbc395b84e1a..6e1dad13bd34de1ca264f128523ab1b0410d4eb3 100644 (file)
@@ -311,8 +311,8 @@ int client_alloc(int fd, const struct master_service_connection *conn,
                /* Start by assuming this is the end client connection.
                   Later on this can be overwritten. */
                client->end_client_tls_secured = conn->haproxy.ssl;
-               client->local_name = conn->haproxy.hostname;
-               client->client_cert_common_name = conn->haproxy.cert_common_name;
+               client->local_name = p_strdup(client->pool, conn->haproxy.hostname);
+               client->client_cert_common_name = p_strdup(client->pool, conn->haproxy.cert_common_name);
                /* Check that alpn matches. */
                if (conn->haproxy.alpn_size > 0) {
                        const char *proto =