summaryrefslogtreecommitdiff
path: root/server/tools
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-12-08 11:10:52 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-08 12:30:02 -0500
commit98fe151be09eb4be295f46d8a4e68feea6e9fcd6 (patch)
treea4783ad04329891edd7f771702f8ad18f464ed3a /server/tools
parent99d9df65b65928f754f75013cf9f2f06bdbf3104 (diff)
downloadsssd-98fe151be09eb4be295f46d8a4e68feea6e9fcd6.tar.gz
sssd-98fe151be09eb4be295f46d8a4e68feea6e9fcd6.tar.bz2
sssd-98fe151be09eb4be295f46d8a4e68feea6e9fcd6.zip
Avoid returning uninitialized result.
If grouplist was a zero-length array, we would return ret unitialized.
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/tools_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/tools/tools_util.c b/server/tools/tools_util.c
index b509ccb2..97945238 100644
--- a/server/tools/tools_util.c
+++ b/server/tools/tools_util.c
@@ -207,6 +207,7 @@ int check_group_names(struct tools_ctx *tctx,
return ENOMEM;
}
+ ret = EOK;
for (i=0; grouplist[i]; ++i) {
ret = sysdb_getgrnam_sync(tctx,
tctx->ev,