Why is realloc preferred, since calloc initializes the elements to NULL,and how this will leak, since there is a free(sorted) in the destructor?