Fix subtle memory leak because of order of struct initialisation.
Merge pull request #43 from rolftimmermans/memory-leak

Fix subtle memory leak because of order of struct initialisation.