Skip to content
Snippets Groups Projects
Commit f3d6ebac authored by Olivier Fourdan's avatar Olivier Fourdan :tools:
Browse files

Close xcb connection after freeing display structure


Commit 1472048b to fix a colormap threading issue added a display
lock/unlock and a call to SyncHandle() to _XcmsFreeClientCmaps().

When running synchronized, that means calling XSync().

_XcmsFreeClientCmaps() is called from _XFreeDisplayStructure() via
XCloseDisplay() after the xcb connection is closed.

So when running synchronized, we may end up calling XSync() after the
xcb connection to the display is closed, which will generate a spurious
XIO error:

  | #0 in _XDefaultIOError () at /lib64/libX11.so.6
  | #1 in _XIOError () at /lib64/libX11.so.6
  | #2 in _XReply () at /lib64/libX11.so.6
  | #3 in XSync () at /lib64/libX11.so.6
  | #4 in _XSyncFunction () at /lib64/libX11.so.6
  | 8#5 in _XFreeDisplayStructure () at /lib64/libX11.so.6
  | 8#6 in XCloseDisplay () at /lib64/libX11.so.6

To avoid that issue, closed the xcb connection to the display last.

v2: And same in OutOfMemory() as well (José Expósito)

Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: default avatarJosé Expósito <jexposit@redhat.com>
Part-of: <xorg/lib/libx11!264>
parent ed9fb553
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment