Skip to content

Fix a leak in cairo-xcb's render compositor

Uli Schlachter requested to merge psychon/cairo:xcb-fix-clip-leak into master

The code here temporary replaces extents->clip with another clip to call a function. Afterwards, it restores the previous copy. The temporary clip is only freed when it still is pointed to by extents->clip.

This logic is wrong. It is indeed possible that the clip is simplified and changes. In this case, the original clip is also correctly freed. However, this still means that we have to clean up and destroy the new clip. The previous code just leaked it.

This was originally identified by Massimo in 1. I am just committing his patch.

Fixes: #24 (closed) Signed-off-by: Uli Schlachter psychon@znc.in

Merge request reports