config_file: Guard against possible calloc/malloc/realloc failures.