summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index de23607a..41c677d7 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1613,7 +1613,7 @@ errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb,
ret = sysdb_attrs_get_el(attrs,
SYSDB_NAME,
&sysdb_name_el);
- if (sysdb_name_el->num_values == 0) {
+ if (ret != EOK || sysdb_name_el->num_values == 0) {
ret = EINVAL;
goto done;
}
@@ -1730,7 +1730,7 @@ errno_t sysdb_attrs_get_aliases(TALLOC_CTX *mem_ctx,
ret = sysdb_attrs_get_el(attrs,
SYSDB_NAME,
&sysdb_name_el);
- if (sysdb_name_el->num_values == 0) {
+ if (ret != EOK || sysdb_name_el->num_values == 0) {
ret = EINVAL;
goto done;
}