1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

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

Fixes #14868.
This commit is contained in:
Yu Watanabe 2020-02-26 22:26:23 +09:00
parent 1ad448673e
commit 662d74daf7

View File

@ -700,12 +700,8 @@ int userdb_all(UserDBFlags flags, UserDBIterator **ret) {
setpwent();
iterator->nss_iterating = true;
goto finish;
}
if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE))
goto finish;
return r;
} else if (r < 0)
return r;
finish:
*ret = TAKE_PTR(iterator);