mirror of
https://github.com/swaywm/sway.git
synced 2025-10-28 05:40:16 -04:00
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.
This commit is contained in:
parent
7e7994dbb2
commit
9fb9e9f7d5
2 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -502,6 +502,7 @@ void server_fini(struct sway_server *server) {
|
|||
wlr_backend_destroy(server->backend);
|
||||
wl_display_destroy(server->wl_display);
|
||||
list_free(server->dirty_nodes);
|
||||
free(server->socket);
|
||||
}
|
||||
|
||||
bool server_start(struct sway_server *server) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue