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-connection-render.c | |
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-connection-render.c')
-rw-r--r-- | src/cairo-xcb-connection-render.c | 2 |
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 |