From 67ee995cc1ec0a9ae2247dae6bdde54211be8c5a Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 9 Sep 2015 12:09:21 +0000 Subject: [PATCH] No need to keep global options around for client which doesn't use them. --- cfg.c | 2 +- client.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cfg.c b/cfg.c index ecb38fc0..2f457e6b 100644 --- a/cfg.c +++ b/cfg.c @@ -98,7 +98,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 55c5aa56..d36be86b 100644 --- a/client.c +++ b/client.c @@ -268,6 +268,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); /* Create imsg. */ imsg_init(&client_ibuf, fd);