aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md7
-rw-r--r--server.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69cf9ded..39eab318 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,6 +77,13 @@
### Deprecated
### Removed
### Fixed
+
+* Use-after-free during shutdown when footclient and the client
+ application exit simultaneously in a short window ([#2432][2432]).
+
+[2342]: https://codeberg.org/dnkl/foot/pulls/2432
+
+
### Security
### Contributors
diff --git a/server.c b/server.c
index 25963325..46560d5c 100644
--- a/server.c
+++ b/server.c
@@ -426,11 +426,9 @@ shutdown:
fdm_del(fdm, fd);
client->fd = -1;
- if (client->instance != NULL &&
- !client->instance->terminal->shutdown.in_progress)
- {
+ if (client->instance != NULL)
term_shutdown(client->instance->terminal);
- } else
+ else
client_destroy(client);
return true;