I searched for all usages of malloc, realloc, and calloc, and added NULL checks where they were missing.
Merge branch 'outOfMemoryChecks'