diff options
author | Uli Schlachter <psychon@znc.in> | 2021-05-02 17:49:32 +0200 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2021-05-02 17:49:32 +0200 |
commit | c16094fc443c076475c4633d83d6e67539cf423e (patch) | |
tree | b76b827bb3df0cd95c055c083b04a0091e59acc9 /src/cairo-xcb-private.h | |
parent | 4f61b765c9f657fd755194afe576e56f945af4b6 (diff) | |
download | cairo-c16094fc443c076475c4633d83d6e67539cf423e.tar.gz |
xcb: Remove free XID cache
cairo-xcb kept a cache of free xid to avoid calling xcb_generate_id()
later. However, this is unsafe: When libxcb runs out of ids, it asks the
X11 server for an empty range of ids to use. The X11 server of course
does not know about cairo's cache and could hand out an id that cairo
will use again later. This would then result in BadIdChoice errors
later.
Fix this by simply removing the whole cache.
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/434
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-private.h')
-rw-r--r-- | src/cairo-xcb-private.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h index f5d5a4c81..46b6e515d 100644 --- a/src/cairo-xcb-private.h +++ b/src/cairo-xcb-private.h @@ -226,9 +226,6 @@ struct _cairo_xcb_connection { const xcb_query_extension_reply_t *shm; xcb_render_sub_pixel_t *subpixel_orders; - cairo_list_t free_xids; - cairo_freepool_t xid_pool; - cairo_mutex_t shm_mutex; cairo_list_t shm_pools; cairo_list_t shm_pending; @@ -323,13 +320,6 @@ _cairo_xcb_connection_acquire (cairo_xcb_connection_t *connection) return cairo_device_acquire (&connection->device); } -cairo_private uint32_t -_cairo_xcb_connection_get_xid (cairo_xcb_connection_t *connection); - -cairo_private void -_cairo_xcb_connection_put_xid (cairo_xcb_connection_t *connection, - uint32_t xid); - static inline void _cairo_xcb_connection_release (cairo_xcb_connection_t *connection) { |