Fixed a use after free in rio.

Screen was being queried from within a client after it had been free'd.
This commit is contained in:
Karsten Pedersen 2021-06-02 09:57:10 +00:00 committed by Dan Cross
parent 45124b23d2
commit 0ebf279d89

View file

@ -116,9 +116,10 @@ manage(Client *c, int mapped)
} }
if(c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))){ if(c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))){
ScreenInfo *screen = c->screen;
XKillClient(dpy, c->window); XKillClient(dpy, c->window);
rmclient(c); rmclient(c);
if(current && current->screen == c->screen) if(current && current->screen == screen)
cmapfocus(current); cmapfocus(current);
return 0; return 0;
} }