Fix memory leak
Merge pull request #4 from client9/master

Fix memory leak