Call it laziness, but doing that would force to destroy the elements that were copied before the call to calloc failed. AFAIK the x memory functions should be used all over the place, we even have a special define that makes sure that nobody uses the normal functions.