The attached patch fixes various memleaks in XCursor. I've also forced some NULL assignment, to be safe against double free (I haven't found any but you never know :)
Created attachment 3347 [details] [review] fix memleak
closing bug as fixed, see commit e0a501e91c270c0e99a55aa568f6df0d3d6e541d
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.