use xalloc
fix zeroing in xmalloc
fix potential resource leak
Merge pull request #150 from ronnychevalier/rc/fix_xmalloc

Fix zeroing in xmalloc
Merge pull request #149 from ronnychevalier/rc/fix_potential_leak

fix potential resource leak
Merge pull request #146 from ronnychevalier/rc/xalloc

Use xalloc everywhere