core: fix use-after-free in session_init
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
a96cdc7e15
commit
dfd9ecf5c9
|
@ -2067,13 +2067,13 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
|
|||
children = NULL;
|
||||
nchildren = 0;
|
||||
}
|
||||
free(reply);
|
||||
|
||||
for (int i = 0; i < nchildren; i++) {
|
||||
auto w =
|
||||
add_win_above(ps, children[i], i ? children[i - 1] : XCB_NONE);
|
||||
fill_win(ps, w);
|
||||
}
|
||||
free(reply);
|
||||
|
||||
HASH_ITER2(ps->windows, w) {
|
||||
assert(!w->is_new);
|
||||
|
|
Loading…
Reference in New Issue