i can't find the segmentation fault here, can you?
void create_dependancy(Rule* rules, Rule* parent, char* target) {
    Dependency* curr = parent->dependencies;
    int exists = 0;

    while (curr != NULL && exists != 1) {
        printf("%s\n", curr->rule->target);
        if (strcmp(curr->rule->target, target) == 0) {
            exists = 1;
        }
        curr = curr->next_dep;
    }
    if (exists != 1) {
        printf("before malloc");
        curr = malloc(sizeof(struct dep_node));
        printf("after malloc");
        curr->rule = create_rule(rules, target);
        curr->next_dep = NULL;
    }
}