Skip to content
  • Uli Schlachter's avatar
    Fix a leak in cairo-xcb's render compositor · eb75ce08
    Uli Schlachter authored
    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.
    
    [1]: https://bugs.freedesktop.org/show_bug.cgi?id=91267
    
    Fixes: cairo/cairo#24
    
    
    Signed-off-by: default avatarUli Schlachter <psychon@znc.in>
    eb75ce08