diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-09 08:34:17 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-09 08:34:17 +0000 |
commit | b3107d26dfdabaeaffa558db40e69962e7c697f6 (patch) | |
tree | 5c3cf37cda4a4ea1ae07754581c87784e9d89954 | |
parent | 05f1680efaae84222a88f8fdeed34e72a5085b42 (diff) |
Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
-rw-r--r-- | cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -112,6 +112,8 @@ load_cfg(const char *path, char **cause) return (0); error: + if (line != NULL) + xfree(line); fclose(f); xasprintf(&ptr, "%s: %s at line %u", path, *cause, n); |