fix a memory leak in xinzhan