summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-04-27 22:50:35 +0000
committernicm <nicm@openbsd.org>2015-04-27 22:50:35 +0000
commit94bd52cdfe768c25dc0689c479941fc5b1f2c4b9 (patch)
tree032029fd3d4a8aad027b5ab40ffbc7cb7beeaa79
parentAssign to the right variable when comparing clients. (diff)
downloadwireguard-openbsd-94bd52cdfe768c25dc0689c479941fc5b1f2c4b9.tar.xz
wireguard-openbsd-94bd52cdfe768c25dc0689c479941fc5b1f2c4b9.zip
Reset cfg_ncauses to 0 as well or we could allocate the wrong size if
called again.
-rw-r--r--usr.bin/tmux/cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c
index 1afd2e103ab..1c8e3a53bc3 100644
--- a/usr.bin/tmux/cfg.c
+++ b/usr.bin/tmux/cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfg.c,v 1.36 2015/04/25 18:49:01 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.37 2015/04/27 22:50:35 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -140,6 +140,7 @@ cfg_print_causes(struct cmd_q *cmdq)
free(cfg_causes);
cfg_causes = NULL;
+ cfg_ncauses = 0;
}
void
@@ -161,4 +162,5 @@ cfg_show_causes(struct session *s)
free(cfg_causes);
cfg_causes = NULL;
+ cfg_ncauses = 0;
}