summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-respawn-window.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/cmd-respawn-window.c
parent8a386e18f9ebed887bd888ffd5bede8694b2ef62 (diff)
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/cmd-respawn-window.c')
-rw-r--r--usr.bin/tmux/cmd-respawn-window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-respawn-window.c b/usr.bin/tmux/cmd-respawn-window.c
index 6cc4b3e3b6c..520db456b4f 100644
--- a/usr.bin/tmux/cmd-respawn-window.c
+++ b/usr.bin/tmux/cmd-respawn-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-respawn-window.c,v 1.14 2011/07/04 13:35:37 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-window.c,v 1.15 2012/07/10 11:53:01 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -18,6 +18,7 @@
#include <sys/types.h>
+#include <stdlib.h>
#include <unistd.h>
#include "tmux.h"
@@ -81,7 +82,7 @@ cmd_respawn_window_exec(struct cmd *self, struct cmd_ctx *ctx)
cmd = NULL;
if (window_pane_spawn(wp, cmd, NULL, NULL, &env, s->tio, &cause) != 0) {
ctx->error(ctx, "respawn window failed: %s", cause);
- xfree(cause);
+ free(cause);
environ_free(&env);
server_destroy_pane(wp);
return (-1);