summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_autofs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_async_autofs.c')
-rw-r--r--src/providers/ldap/sdap_async_autofs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_autofs.c b/src/providers/ldap/sdap_async_autofs.c
index 616a3b9a5..1db8d2067 100644
--- a/src/providers/ldap/sdap_async_autofs.c
+++ b/src/providers/ldap/sdap_async_autofs.c
@@ -844,7 +844,8 @@ sdap_autofs_setautomntent_save(struct tevent_req *req)
j++;
}
- ldap_entrylist[state->entries_count] = NULL;
+ /* terminate array with NULL after the last retrieved entry */
+ ldap_entrylist[j] = NULL;
}
ret = sysdb_autofs_entries_by_map(tmp_ctx, state->dom, state->mapname,