fix two tiny memleaks