diff --git a/cfg.c b/cfg.c index 9548f582..9657302b 100644 --- a/cfg.c +++ b/cfg.c @@ -97,7 +97,7 @@ load_cfg(const char *path, struct cmd_q *cmdq, char **cause) } found = 0; - while ((buf = fparseln(f, NULL, &line, delim, 0))) { + while ((buf = fparseln(f, NULL, &line, delim, 0)) != NULL) { log_debug("%s: %s", path, buf); /* Skip empty lines. */ diff --git a/client.c b/client.c index ef560668..0d7227d7 100644 --- a/client.c +++ b/client.c @@ -264,6 +264,10 @@ client_main(struct event_base *base, int argc, char **argv, int flags) } return (1); } + options_free(&global_options); + options_free(&global_s_options); + options_free(&global_w_options); + environ_free(&global_environ); /* Set process title, log and signals now this is the client. */ #ifdef HAVE_SETPROCTITLE