summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-07-10 11:53:01 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-07-10 11:53:01 +0000
commitdf912e3540968a2a0b266e523ecc08bb2dc0ca20 (patch)
treec2c59d025e08aab048b251d1711ed655cdf115f6 /cfg.c
parenta3391692ad5800ca034bbbdcd803924fc4e392ee (diff)
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cfg.c b/cfg.c
index 22a50d22..733238f3 100644
--- a/cfg.c
+++ b/cfg.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "tmux.h"
@@ -117,14 +118,14 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
line = NULL;
if (cmd_string_parse(buf, &cmdlist, &cause) != 0) {
- xfree(buf);
+ free(buf);
if (cause == NULL)
continue;
cfg_add_cause(causes, "%s: %u: %s", path, n, cause);
- xfree(cause);
+ free(cause);
continue;
} else
- xfree(buf);
+ free(buf);
if (cmdlist == NULL)
continue;
cfg_cause = NULL;
@@ -150,13 +151,13 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
if (cfg_cause != NULL) {
cfg_add_cause(
causes, "%s: %d: %s", path, n, cfg_cause);
- xfree(cfg_cause);
+ free(cfg_cause);
}
}
if (line != NULL) {
cfg_add_cause(causes,
"%s: %d: line continuation at end of file", path, n);
- xfree(line);
+ free(line);
}
fclose(f);