From 51ac2a3202d55c439976ecce49229e35865c7ebd Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 21 Mar 2013 16:54:37 +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 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); -- cgit