Clear session when freeing client, GitHub issue 5712 from Jeong, Heon.

This commit is contained in:
nicm
2026-10-09 10:16:02 +00:00
committed by tmux update bot
parent a0a0e12234
commit c9c6a8f2ba

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: server-client.c,v 1.518 2026/10/06 10:55:55 nicm Exp $ */
/* $OpenBSD: server-client.c,v 1.519 2026/10/09 10:16:02 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -404,6 +404,9 @@ server_client_lost(struct client *c)
if (c->name != NULL && (c->flags & (CLIENT_CONTROL|CLIENT_TERMINAL)))
events_fire_client("client-closed", c);
c->session = NULL;
c->last_session = NULL;
if (c->flags & CLIENT_CONTROL)
control_stop(c);
if (c->flags & CLIENT_TERMINAL)