summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2019-08-12 00:52:36 +0000
committerokan <okan>2019-08-12 00:52:36 +0000
commit6131e36f8a838aa54ed687dc08b387bceeb70fdf (patch)
tree07a6b7678214a73845b415c998ed243b81235be0
parentfdb841c3b0393f960afaab6bcc9dcc1c0d569018 (diff)
downloadcwm-6131e36f8a838aa54ed687dc08b387bceeb70fdf.tar.gz
cwm-6131e36f8a838aa54ed687dc08b387bceeb70fdf.tar.xz
cwm-6131e36f8a838aa54ed687dc08b387bceeb70fdf.zip
Fix regression from r1.107 (lost a return); kettenis@ pointed out the high
potential for a use-after-free (true!) where kn@ ran into the regression using
an app that actually exercised the XGrabPointer() failure path.
-rw-r--r--menu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/menu.c b/menu.c
index d0d3802..60633fc 100644
--- a/menu.c
+++ b/menu.c
@@ -129,6 +129,7 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt,
 	    CurrentTime) != GrabSuccess) {
 		XftDrawDestroy(mc.xftdraw);
 		XDestroyWindow(X_Dpy, mc.win);
+		return(NULL);
 	}
 
 	XGetInputFocus(X_Dpy, &focuswin, &focusrevert);