summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cfg.c b/cfg.c
index f9ad300f..aa2ceea4 100644
--- a/cfg.c
+++ b/cfg.c
@@ -131,8 +131,10 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
buf = copy;
while (isspace((u_char)*buf))
buf++;
- if (*buf == '\0')
+ if (*buf == '\0') {
+ free(copy);
continue;
+ }
if (cmd_string_parse(buf, &cmdlist, &cause) != 0) {
free(copy);