fix: memory leaks

This commit is contained in:
2025-06-06 19:39:55 +02:00
parent 04a102a7bb
commit b22ae6b2cc
3 changed files with 7 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ static struct user __new_user(struct passwd *p) {
// This code is designed to be run purely single threaded
struct Vector get_human_users() {
struct Vector users = vec_new();
vec_reserve(&users, 4);
struct passwd *pwd;
while ((pwd = getpwent()) != NULL) {