Merge pull request #57 from rosslagerwall/memleak Fix a couple of memory leaks (found with Valgrind).