From: Michael Stapelberg Date: Sun, 2 Feb 2014 10:22:42 +0000 (+0100) Subject: i3bar: fix resource leak: statusline_ctx needs to be freed first X-Git-Tag: 4.8~107^2~1^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a4d504485139dc9bf4c846c26a38968a920dfcb1;p=i3%2Fi3 i3bar: fix resource leak: statusline_ctx needs to be freed first In practice this is rarely noticeable, unless you very often switch screen resolutions, I think. fixes #1172 --- diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 82861039..3a9c061b 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -1395,8 +1395,8 @@ void realloc_sl_buffer(void) { mask |= XCB_GC_BACKGROUND; vals[0] = colors.bar_fg; - statusline_ctx = xcb_generate_id(xcb_connection); xcb_free_gc(xcb_connection, statusline_ctx); + statusline_ctx = xcb_generate_id(xcb_connection); xcb_void_cookie_t sl_ctx_cookie = xcb_create_gc_checked(xcb_connection, statusline_ctx, xcb_root,