Fix leak: free gdi object (if it wasn’t freed before)