summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap_async_sudo_hostinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_sudo_hostinfo.c b/src/providers/ldap/sdap_async_sudo_hostinfo.c
index 99a9bc77..82b63296 100644
--- a/src/providers/ldap/sdap_async_sudo_hostinfo.c
+++ b/src/providers/ldap/sdap_async_sudo_hostinfo.c
@@ -281,7 +281,9 @@ static int sdap_sudo_get_ip_addresses(TALLOC_CTX *mem_ctx, char ***_ip_addr_list
ip_addr, network_addr, netmask));
}
- ip_addr_list[addr_count] = NULL;
+ if (ip_addr_list) {
+ ip_addr_list[addr_count] = NULL;
+ }
*_ip_addr_list = talloc_steal(mem_ctx, ip_addr_list);
done: