aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYaoBing Xiao <xiaoyaobing@uniontech.com>2025-06-05 13:46:06 +0800
committerSimon Ser <contact@emersion.fr>2025-06-05 09:59:46 +0200
commit9fb9e9f7d555ae7504b8ae53250020797d70e887 (patch)
tree9b947dfee150482adf015942d8d574fe0c2d57c7 /include
parent7e7994dbb2a2c04f55b3c74eb61577c51e9a43ae (diff)
server: fix socket path memory leak
The socket path allocated with strdup() in server_init() was not being freed in server_fini(). Remove const qualifier and add proper cleanup.
Diffstat (limited to 'include')
-rw-r--r--include/sway/server.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sway/server.h b/include/sway/server.h
index e7d7094f..1cb72e77 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -27,7 +27,7 @@ struct sway_session_lock {
struct sway_server {
struct wl_display *wl_display;
struct wl_event_loop *wl_event_loop;
- const char *socket;
+ char *socket;
struct wlr_backend *backend;
struct wlr_session *session;