summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/providers/data_provider_fo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index 3d726da1..d4e04983 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -436,6 +436,13 @@ static void be_resolve_server_done(struct tevent_req *subreq)
struct resolv_hostent *srvaddr;
char ipaddr[128];
srvaddr = fo_get_server_hostent(state->srv);
+ if (!srvaddr) {
+ DEBUG(3, ("FATAL: No hostent available for server (%s)\n",
+ fo_get_server_name(state->srv)));
+ tevent_req_error(req, EFAULT);
+ return;
+ }
+
inet_ntop(srvaddr->family, srvaddr->addr_list[0]->ipaddr,
ipaddr, 128);