summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cfg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-07-10 11:53:02 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-07-10 11:53:02 +0000
commit0ed606e0c38d62777110f204c4bccdfd890a34ea (patch)
tree48bd8518754ed4e6522fdbc3be9885313ad0a227 /usr.bin/tmux/cfg.c
parent8a386e18f9ebed887bd888ffd5bede8694b2ef62 (diff)
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/cfg.c')
-rw-r--r--usr.bin/tmux/cfg.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c
index 6f935622662..c0dbb9ed0ec 100644
--- a/usr.bin/tmux/cfg.c
+++ b/usr.bin/tmux/cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfg.c,v 1.14 2012/05/17 21:21:31 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.15 2012/07/10 11:53:01 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);