Fix a couple of memory leaks, from Romain Francoise.

This commit is contained in:
Nicholas Marriott
2013-03-21 16:54:37 +00:00
parent 48291f0eeb
commit 51ac2a3202
2 changed files with 3 additions and 2 deletions

4
cfg.c
View File

@ -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);