Fix memory leaks
Merge pull request #1 from ian-de-vries/master

Fix memory leaks