aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index b3954259..2c642a37 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -73,14 +73,11 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
73 unlink(ipc_sockaddr->sun_path); 73 unlink(ipc_sockaddr->sun_path);
74 74
75 while (ipc_client_list->length) { 75 while (ipc_client_list->length) {
76 struct ipc_client *client = ipc_client_list->items[0]; 76 ipc_client_disconnect(ipc_client_list->items[ipc_client_list->length-1]);
77 ipc_client_disconnect(client);
78 } 77 }
79 list_free(ipc_client_list); 78 list_free(ipc_client_list);
80 79
81 if (ipc_sockaddr) { 80 free(ipc_sockaddr);
82 free(ipc_sockaddr);
83 }
84 81
85 wl_list_remove(&ipc_display_destroy.link); 82 wl_list_remove(&ipc_display_destroy.link);
86} 83}