summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-connection-render.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2021-05-02 17:49:32 +0200
committerUli Schlachter <psychon@znc.in>2021-05-02 17:49:32 +0200
commitc16094fc443c076475c4633d83d6e67539cf423e (patch)
treeb76b827bb3df0cd95c055c083b04a0091e59acc9 /src/cairo-xcb-connection-render.c
parent4f61b765c9f657fd755194afe576e56f945af4b6 (diff)
downloadcairo-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-connection-render.c')
-rw-r--r--src/cairo-xcb-connection-render.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/cairo-xcb-connection-render.c b/src/cairo-xcb-connection-render.c
index 61119653e..e27b2b3b2 100644
--- a/src/cairo-xcb-connection-render.c
+++ b/src/cairo-xcb-connection-render.c
@@ -79,7 +79,6 @@ _cairo_xcb_connection_render_free_picture (cairo_xcb_connection_t *connection,
{
assert (connection->flags & CAIRO_XCB_HAS_RENDER);
xcb_render_free_picture (connection->xcb_connection, picture);
- _cairo_xcb_connection_put_xid (connection, picture);
}
void
@@ -133,7 +132,6 @@ _cairo_xcb_connection_render_free_glyph_set (cairo_xcb_connection_t *connec
{
assert (connection->flags & CAIRO_XCB_HAS_RENDER);
xcb_render_free_glyph_set (connection->xcb_connection, glyphset);
- _cairo_xcb_connection_put_xid (connection, glyphset);
}
void