Add minimal protection from calloc/malloc errors