From d8370864f3b1e1d233d5f7bf7ccc93605d613aa4 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 22 Jun 2026 12:39:56 +0000 Subject: [PATCH] Memory leak from someone in GitHub issue 5259. --- window-customize.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/window-customize.c b/window-customize.c index 71ca206fb..a31acc8ba 100644 --- a/window-customize.c +++ b/window-customize.c @@ -740,8 +740,10 @@ window_customize_draw_option(struct window_customize_modedata *data, if (strcmp(expanded, value) != 0) { if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0, &grid_default_cell, "This expands to: %s", - expanded)) + expanded)) { + free(expanded); goto out; + } } free(expanded); }