Switched to using calloc (for simplicity).