Two small memory leaks, also noticed by Martin Prikryl.