Fix a couple of memory leaks.