X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=src%2Fmain.c;h=5d6a68b9689f611cdd2d8f6f7dcb416cbd795da9;hp=eeeb3419c366b959feb01d5f7a9fefd27c540eda;hb=HEAD;hpb=b87bc70cd6184f3fd066587df960a628a34e17fd diff --git a/src/main.c b/src/main.c index eeeb3419..5d6a68b9 100644 --- a/src/main.c +++ b/src/main.c @@ -32,7 +32,7 @@ * RLIM_INFINITY for i3 debugging versions. */ struct rlimit original_rlimit_core; -/** The number of file descriptors passed via socket activation. */ +/* The number of file descriptors passed via socket activation. */ int listen_fds; /* We keep the xcb_prepare watcher around to be able to enable and disable it @@ -160,13 +160,6 @@ void main_set_x11_cb(bool enable) { * */ static void i3_exit(void) { -/* We need ev >= 4 for the following code. Since it is not *that* important (it - * only makes sure that there are no i3-nagbar instances left behind) we still - * support old systems with libev 3. */ -#if EV_VERSION_MAJOR >= 4 - ev_loop_destroy(main_loop); -#endif - if (*shmlogname != '\0') { fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname); fflush(stderr); @@ -174,6 +167,18 @@ static void i3_exit(void) { } ipc_shutdown(SHUTDOWN_REASON_EXIT); unlink(config.ipc_socket_path); + xcb_disconnect(conn); + +/* We need ev >= 4 for the following code. Since it is not *that* important (it + * only makes sure that there are no i3-nagbar instances left behind) we still + * support old systems with libev 3. */ +#if EV_VERSION_MAJOR >= 4 + ev_loop_destroy(main_loop); +#endif + +#ifdef I3_ASAN_ENABLED + __lsan_do_leak_check(); +#endif } /*