day 21: fix memory leaks

This commit is contained in:
2022-01-25 13:46:48 +01:00
parent 58027905b8
commit 7082ce3565

View File

@@ -193,10 +193,9 @@ static u64 part2()
enqueue(new);
}
}
}
}
pool_add(pool_queue, queue);
}
return count1 > count2? count1: count2;
}
@@ -236,6 +235,7 @@ int main(int ac, char **av)
read_input();
printf("%s : res=%ld\n", *av, part == 1? part1(): part2());
pool_destroy(pool_queue);
exit(0);
}