what is wrong with my insert function
void insert_rule(Rule** head, Rule* rule) {
    Rule* curr = *head;
    if (curr == NULL) {
        curr = rule;
        return;
    }

    while (curr->next_rule != NULL) {
        curr = curr->next_rule;
    }

    curr->next_rule = rule;
    return;
}
