Bugfix: Free property replies in their handlers
This commit is contained in:
parent
d3e3339a05
commit
4875868689
|
@ -986,9 +986,8 @@ static int property_notify(uint8_t state, xcb_window_t window, xcb_atom_t atom)
|
||||||
propr = xcb_get_property_reply(conn, cookie, 0);
|
propr = xcb_get_property_reply(conn, cookie, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = handler->cb(NULL, conn, state, window, atom, propr);
|
/* the handler will free() the reply */
|
||||||
FREE(propr);
|
return handler->cb(NULL, conn, state, window, atom, propr);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
12
src/window.c
12
src/window.c
|
@ -37,6 +37,8 @@ void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool bef
|
||||||
return;
|
return;
|
||||||
|
|
||||||
run_assignments(win);
|
run_assignments(win);
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -80,6 +82,8 @@ void window_update_name(i3Window *win, xcb_get_property_reply_t *prop, bool befo
|
||||||
return;
|
return;
|
||||||
|
|
||||||
run_assignments(win);
|
run_assignments(win);
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -121,6 +125,8 @@ void window_update_name_legacy(i3Window *win, xcb_get_property_reply_t *prop, bo
|
||||||
return;
|
return;
|
||||||
|
|
||||||
run_assignments(win);
|
run_assignments(win);
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -140,6 +146,8 @@ void window_update_leader(i3Window *win, xcb_get_property_reply_t *prop) {
|
||||||
DLOG("Client leader changed to %08x\n", *leader);
|
DLOG("Client leader changed to %08x\n", *leader);
|
||||||
|
|
||||||
win->leader = *leader;
|
win->leader = *leader;
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -159,6 +167,8 @@ void window_update_transient_for(i3Window *win, xcb_get_property_reply_t *prop)
|
||||||
DLOG("Transient for changed to %08x\n", transient_for);
|
DLOG("Transient for changed to %08x\n", transient_for);
|
||||||
|
|
||||||
win->transient_for = transient_for;
|
win->transient_for = transient_for;
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -179,4 +189,6 @@ void window_update_strut_partial(i3Window *win, xcb_get_property_reply_t *prop)
|
||||||
strut[0], strut[1], strut[2], strut[3]);
|
strut[0], strut[1], strut[2], strut[3]);
|
||||||
|
|
||||||
win->reserved = (struct reservedpx){ strut[0], strut[1], strut[2], strut[3] };
|
win->reserved = (struct reservedpx){ strut[0], strut[1], strut[2], strut[3] };
|
||||||
|
|
||||||
|
free(prop);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue