]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: don't leak config path
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Wed, 24 Aug 2016 07:56:44 +0000 (03:56 -0400)
committerTeemu Huovila <teemu.huovila@dovecot.fi>
Mon, 29 Aug 2016 11:47:54 +0000 (14:47 +0300)
The config path can already be non-NULL thanks to the default config path
code or the CONFIG_PATH environmental variable.

src/lib-master/master-service.c

index 76cf50ed08ec733f3d1d299d10dc42cd7c5bcc85..2a00c35a4c94c816a20a4def61ffc43b1336aa47 100644 (file)
@@ -430,6 +430,7 @@ bool master_service_parse_option(struct master_service *service,
 
        switch (opt) {
        case 'c':
+               i_free(service->config_path);
                service->config_path = i_strdup(arg);
                service->config_path_changed_with_param = TRUE;
                break;