Handle malloc/free correctly. Add some comments.

--HG--
branch : HEAD
1 file changed