From 81f2bf4c0721809cf452ded50cec65a1c5e37a46 Mon Sep 17 00:00:00 2001 From: Maxim Solovyov Date: Tue, 10 Jan 2023 01:13:08 +0300 Subject: [PATCH] picom: fix xcb_request_check memory leaks --- src/picom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/picom.c b/src/picom.c index b5ac3a34..8fb0a73c 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1463,6 +1463,7 @@ static void handle_pending_updates(EV_P_ struct session *ps) { auto e = xcb_request_check(ps->c, xcb_grab_server_checked(ps->c)); if (e) { log_fatal_x_error(e, "failed to grab x server"); + free(e); return quit(ps); } @@ -1498,6 +1499,7 @@ static void handle_pending_updates(EV_P_ struct session *ps) { e = xcb_request_check(ps->c, xcb_ungrab_server_checked(ps->c)); if (e) { log_fatal_x_error(e, "failed to ungrab x server"); + free(e); return quit(ps); } @@ -1822,6 +1824,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy, XCB_EVENT_MASK_PROPERTY_CHANGE})); if (e) { log_error_x_error(e, "Failed to setup root window event mask"); + free(e); } xcb_prefetch_extension_data(ps->c, &xcb_render_id);