From: Timo Sirainen Date: Tue, 17 Jan 2017 18:03:40 +0000 (+0200) Subject: doveconf: Don't read freed memory. X-Git-Tag: 2.3.0.rc1~2294 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2568cb8daa00c6ed8051ca7afa6ee030276476b1;p=thirdparty%2Fdovecot%2Fcore.git doveconf: Don't read freed memory. Giving -c parameter frees the returned orig_config_path. --- diff --git a/src/config/doveconf.c b/src/config/doveconf.c index f67fa00a28..ed7ad61004 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -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);