From ccdebead79d4c20a0ad82f247d9339224af19a82 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 28 Oct 2019 09:07:59 +0000 Subject: [PATCH] Start with empty rather than NULL window name to avoid NULL printf if window_name is evaluated early. Reported by Mikolaj Kucharski. --- window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/window.c b/window.c index e3b20a3e..21bf366f 100644 --- a/window.c +++ b/window.c @@ -313,7 +313,7 @@ window_create(u_int sx, u_int sy) struct window *w; w = xcalloc(1, sizeof *w); - w->name = NULL; + w->name = xstrdup(""); w->flags = 0; TAILQ_INIT(&w->panes);