Does this set the dependency->next to a pointer in the heap or is it local?
typedef struct dep_node {
    struct rule_node *rule;
    struct dep_node *next_dep;
} Dependency;

void create_dep(char *line, Rule *rule) {
    Dependency *dependency;

    strtok(line, " \n");  // returns the target name
    strtok(NULL, " \n");  // returns the colon

    char *curr_tok = strtok(NULL, " \n");  // returns the first dependency name OR NULL if none

    while (curr_tok != NULL) {
        dependency = malloc(sizeof(Dependency));

        dependency->next_dep = NULL;
        dependency->rule = initialize_rule(curr_tok);
        curr_tok = strtok(NULL, " \n");
        dependency = dependency->next_dep;
    }