- Use of calloc instead of malloc
- Test for NULL after allocation