From 94bd52cdfe768c25dc0689c479941fc5b1f2c4b9 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 27 Apr 2015 22:50:35 +0000 Subject: [PATCH] Reset cfg_ncauses to 0 as well or we could allocate the wrong size if called again. --- usr.bin/tmux/cfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ -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; } -- 2.20.1