diff --git a/usr.bin/tmux/format-draw.c b/usr.bin/tmux/format-draw.c index b6389006561..95480882c1f 100644 --- a/usr.bin/tmux/format-draw.c +++ b/usr.bin/tmux/format-draw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format-draw.c,v 1.30 2025/12/04 20:49:57 nicm Exp $ */ +/* $OpenBSD: format-draw.c,v 1.31 2026/04/02 09:35:46 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -1116,7 +1116,7 @@ format_width(const char *expanded) /* * Trim on the left, taking #[] into account. Note, we copy the whole set of * unescaped #s, but only add their escaped size to width. This is because the - * format_draw function will actually do the escaping when it runs + * format_draw function will actually do the escaping. */ char * format_trim_left(const char *expanded, u_int limit) diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index d0db7c86406..5c31e93e22f 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.351 2026/04/02 09:28:22 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.352 2026/04/02 09:35:46 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -5325,6 +5325,7 @@ done: if (marker != NULL && strcmp(new, value) != 0) { free(value); xasprintf(&value, "%s%s", new, marker); + free(new); } else { free(value); value = new; @@ -5335,6 +5336,7 @@ done: if (marker != NULL && strcmp(new, value) != 0) { free(value); xasprintf(&value, "%s%s", marker, new); + free(new); } else { free(value); value = new;