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
next
Michael Stapelberg 2014-02-02 11:22:42 +01:00
parent da12c9f591
commit a4d5044851
1 changed files with 1 additions and 1 deletions

View File

@ -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,