Memory leak fixes from someone in GitHub issues 5739, 5744, 5745, 5746.

This commit is contained in:
nicm
2026-10-15 08:21:11 +00:00
committed by tmux update bot
parent 73d8f81c2c
commit 173e6a9e05
4 changed files with 13 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window-customize.c,v 1.37 2026/10/08 07:50:05 nicm Exp $ */
/* $OpenBSD: window-customize.c,v 1.38 2026/10/15 08:21:11 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1430,6 +1430,7 @@ monitor:
if (wo != NULL && options_owner(o) != wo) {
parent = options_get_only(wo, name);
if (parent != NULL) {
free(value);
value = options_to_string(parent, NULL, 0);
xsnprintf(label, sizeof label,
"Window value (from window %u): ", fs.wl->idx);
@@ -1442,6 +1443,7 @@ monitor:
if (go != NULL && options_owner(o) != go) {
parent = options_get_only(go, name);
if (parent != NULL) {
free(value);
value = options_to_string(parent, NULL, 0);
if (!window_customize_write_value(ctx, s->cx, sx,
sy - (s->cy - cy), 0, "Global value: ", "%s%s%s",