Fix two small memory leaks