Commit dca10482 authored by Will Thompson's avatar Will Thompson Committed by Martin T. H. Sandsmark

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.
parent 3238443d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment