Fixed two other mem leaks I missed.

Sorry about missing these. I should have caught these before doing the previous pull request.