summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-28 13:03:06 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-04-01 19:20:57 +0200
commit5b434d7209594a0ba0c0d0f8b66f381877ffe43d (patch)
tree066b93b4e1f2a5645be4c09eb5bd264f3716b1ff
parent1a2f596bcb14786083c522e493497e99f355f06b (diff)
downloadsystemd-5b434d7209594a0ba0c0d0f8b66f381877ffe43d.tar.gz
nss-systemd: add missing jump to unlock mutex
CID#1412415. (cherry picked from commit e7e9a9d0dce3fe1a133a42f69a2547749b5bcd46)
-rw-r--r--src/nss-systemd/nss-systemd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c
index 9c004616f5..08fe100c05 100644
--- a/src/nss-systemd/nss-systemd.c
+++ b/src/nss-systemd/nss-systemd.c
@@ -432,7 +432,7 @@ enum nss_status _nss_systemd_getgrent_r(
if (!getgrent_data.by_membership) {
r = groupdb_iterator_get(getgrent_data.iterator, &gr);
if (r == -ESRCH) {
- /* So we finished iterating native groups now. let's now continue with iterating
+ /* So we finished iterating native groups now. Let's now continue with iterating
* native memberships, and generate additional group entries for any groups
* referenced there that are defined in NSS only. This means for those groups there
* will be two or more entries generated during iteration, but this is apparently how
@@ -511,7 +511,8 @@ enum nss_status _nss_systemd_getgrent_r(
if (!members) {
UNPROTECT_ERRNO;
*errnop = ENOMEM;
- return NSS_STATUS_TRYAGAIN;
+ ret = NSS_STATUS_TRYAGAIN;
+ goto finish;
}
/* Note that we currently generate one group entry per user that is part of a