1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

userdb: make groupdb_all() always set iterator when it returns >= 0

This commit is contained in:
Yu Watanabe 2020-02-27 18:05:14 +09:00
parent 0ffbe10b81
commit 443876d8dc

View File

@ -903,15 +903,9 @@ int groupdb_all(UserDBFlags flags, UserDBIterator **ret) {
setgrent();
iterator->nss_iterating = true;
goto finish;
}
} if (r < 0)
return r;
if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE))
goto finish;
return r;
finish:
*ret = TAKE_PTR(iterator);
return 0;
}