Fix three minor memleaks
sync