From 0ebf279d89965e36833b47a357da8000bfe528b0 Mon Sep 17 00:00:00 2001 From: Karsten Pedersen Date: Wed, 2 Jun 2021 09:57:10 +0000 Subject: [PATCH] Fixed a use after free in rio. Screen was being queried from within a client after it had been free'd. --- src/cmd/rio/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/rio/manage.c b/src/cmd/rio/manage.c index 33951151..b068a101 100644 --- a/src/cmd/rio/manage.c +++ b/src/cmd/rio/manage.c @@ -116,9 +116,10 @@ manage(Client *c, int mapped) } if(c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))){ + ScreenInfo *screen = c->screen; XKillClient(dpy, c->window); rmclient(c); - if(current && current->screen == c->screen) + if(current && current->screen == screen) cmapfocus(current); return 0; }