]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveconf: Don't read freed memory.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 17 Jan 2017 18:03:40 +0000 (20:03 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 24 Jan 2017 09:33:55 +0000 (11:33 +0200)
Giving -c parameter frees the returned orig_config_path.

src/config/doveconf.c

index d85cd64ef56899a1359756936df0e3c37a960605..a54d1845c432ea15d8d3dfc86000f996ee94b432 100644 (file)
@@ -727,7 +727,7 @@ int main(int argc, char *argv[])
        master_service = master_service_init("config",
                                             MASTER_SERVICE_FLAG_STANDALONE,
                                             &argc, &argv, "adf:hHm:nNpPexS");
-       orig_config_path = master_service_get_config_path(master_service);
+       orig_config_path = t_strdup(master_service_get_config_path(master_service));
 
        i_set_failure_prefix("doveconf: ");
        t_array_init(&module_names, 4);