From 77a217468507bc598e833bf15b4a1eaf7bbaf284 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 16 Feb 2013 19:35:49 +0000 Subject: Fix a couple of memory leaks, from Romain Francoise. --- cfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index 5e3e47e9..c62f60cc 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); -- cgit