diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-03-21 16:54:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2013-03-21 16:54:37 +0000 |
commit | 51ac2a3202d55c439976ecce49229e35865c7ebd (patch) | |
tree | 554f1705c19c6612162b0c4f0bb4ad6cf05c5cc7 /cfg.c | |
parent | 48291f0eeb9c376f821c746ca1ab6b88fcb62db2 (diff) |
Fix a couple of memory leaks, from Romain Francoise.
Diffstat (limited to 'cfg.c')
-rw-r--r-- | cfg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |