summaryrefslogtreecommitdiff
path: root/asterisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c
index b4a643504..9106a5621 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -1851,7 +1851,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
- if (res)
+ if (res || !hp->hp.h_addr)
return NULL;
return &hp->hp;
}