Fix memory leak on string conversion.
Merge pull request #1 from demarque/memleak

Fix memory leak on string conversion.