Fix two memory leaks.