Is there a segmentation fault in this
Rule *init_rule(char *line) {

    Rule *new_rule = malloc(sizeof(Rule));
    new_rule->dependencies = NULL;
    new_rule->actions = NULL;
    new_rule->next_rule = NULL;

    char *ptr = strtok(line, " :");
    new_rule->target = malloc((sizeof(char) * strlen(ptr)) + 1);
    strcpy(new_rule->target, ptr);
    new_rule->target[strlen(ptr)] = '\0';

    return new_rule;
}