x.c: correctly free con->frame_buffer in _x_con_kill

This fixes a crash which I could not reproduce in a testcase with reasonable effort, but the user reported the fix works.

Compare with src/x.c:946.

fixes #3554
fixes #3645
next
Michael Stapelberg 2019-03-07 14:58:53 +01:00 committed by Michael Stapelberg
parent 9bd2224520
commit 79b052230c
1 changed files with 1 additions and 0 deletions

View File

@ -268,6 +268,7 @@ static void _x_con_kill(Con *con) {
draw_util_surface_free(conn, &(con->frame));
draw_util_surface_free(conn, &(con->frame_buffer));
xcb_free_pixmap(conn, con->frame_buffer.id);
con->frame_buffer.id = XCB_NONE;
state = state_for_frame(con->frame.id);
CIRCLEQ_REMOVE(&state_head, state, state);
CIRCLEQ_REMOVE(&old_state_head, state, old_state);