Fix leaks in XMLimport.