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.

Rebased from origin/master.
This commit is contained in:
YaoBing Xiao 2025-06-05 13:46:06 +08:00 committed by myrslint
parent e01eff4810
commit b1134d3ee3
2 changed files with 172 additions and 165 deletions

View file

@ -31,7 +31,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;