GNOME Bugzilla – Bug 729670
cairo surface leaked for each cursor created from pixmap
Last modified: 2014-05-07 23:38:10 UTC
Created attachment 276018 [details] [review] free the cairo_surface_t so it isn't leaked In gdk/gdkcursor.c, in the function gdk_cursor_new_from_pixbuf, at or around line 350, a cairo_surface_t is created and passed to the underlying implementation to create a cursor object. This surface is never freed in this context. Examining some the various backend implementations, none of them apparently free the surface passed in to them either. The leak becomes very visible in an app creating/changing the cursor a lot. I found it in spice's remote-viewer, which for displaying a remote desktop, changes cursors a lot (and must use a pixmap to create them with a lot). The attached patch against 3.10.8 (F20 version) seems to fix the leak and seems to be stable.
Review of attachment 276018 [details] [review]: looks good to me