[fix] Segmentation Fault malloc vs calloc