Attached is a patch for 6.8.2 that fixes the cursor leak.
Created attachment 122253 [details] Cursor leak patch
Thanks for the report and patch Ignatio. [Comment for X engineering for future] This should be investigated on all OS releases, so I've added all the major trackers to this bug. If the problem is confirmed on any given OS release, this bug should be cloned for that release and the tracker moved to the cloned bug.
This is fixed in present rawhide (X.Org 7.1)