summaryrefslogtreecommitdiffstats
path: root/x11vnc/xrandr.c
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2014-07-10 14:34:37 +0100
committerWill Thompson <will@willthompson.co.uk>2014-07-10 14:37:29 +0100
commitc4dff87c8f3edf4f7d3e11cabed4e88abf18aaa3 (patch)
tree543d103f9698e63795332e484944d78549858b5c /x11vnc/xrandr.c
parent8c21b31cefc73d5da230deffe0b3a292f1b24b7a (diff)
downloadlibvncserver-c4dff87c8f3edf4f7d3e11cabed4e88abf18aaa3.zip
libvncserver-c4dff87c8f3edf4f7d3e11cabed4e88abf18aaa3.tar.gz
x11vnc: fix double X_UNLOCK on xrandr events
check_xrandr_event() assumes X_LOCK is taken before it is called, and currently calls X_UNLOCK on behalf of the caller. But in practice, all callers assume that the lock is still held after check_xrandr_event() returns. In particular, this leads to a double-unlock and crash in check_xevents() on any xrandr event.
Diffstat (limited to 'x11vnc/xrandr.c')
-rw-r--r--x11vnc/xrandr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/x11vnc/xrandr.c b/x11vnc/xrandr.c
index d0d68e1..f2fb5ea 100644
--- a/x11vnc/xrandr.c
+++ b/x11vnc/xrandr.c
@@ -268,6 +268,7 @@ int check_xrandr_event(char *msg) {
/* under do_change caller normally returns before its X_UNLOCK */
X_UNLOCK;
handle_xrandr_change(rev->width, rev->height);
+ X_LOCK;
}
if (qout) {
return do_change;
OpenPOWER on IntegriCloud