check to make sure malloc worked
Merge pull request #11 from aaylward/oomcheck

check to make sure malloc worked