]> 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, 17 Jan 2017 18:04:51 +0000 (20:04 +0200)
Giving -c parameter frees the returned orig_config_path.

src/config/doveconf.c

index f67fa00a287a89340a46189928c7c046772c0f3e..ed7ad6100475829bab5e47cd298f3fb9d24bcf04 100644 (file)
@@ -730,7 +730,7 @@ int main(int argc, char *argv[])
        i_zero(&filter);
        master_service = master_service_init("config", master_service_flags,
                                             &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);