]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-program-client: Allocate string settings on the client pool.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 13 Jan 2019 22:34:14 +0000 (23:34 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 5 Feb 2020 13:16:02 +0000 (13:16 +0000)
Before, it assumed the strings to be durably allocated externally, which is very
risky.

src/lib-program-client/program-client.c

index cb45445cd5644b22430e1981edcf00b6ffa12cf0..26870500edb6e8439ae40e390c77b436c7ee571e 100644 (file)
@@ -468,6 +468,9 @@ void program_client_init(struct program_client *pclient, pool_t pool,
        if (args != NULL)
                pclient->args = p_strarray_dup(pool, args);
        pclient->set = *set;
+       pclient->set.dns_client_socket_path =
+               p_strdup(pool, set->dns_client_socket_path);
+       pclient->set.home = p_strdup(pool, set->home);
        pclient->debug = set->debug;
        pclient->fd_in = -1;
        pclient->fd_out = -1;