aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-27 19:23:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-27 19:23:12 +0000
commitbb5aaa7d75848b347d77bca081a9dd6130fe415e (patch)
tree2acb969374d32b5a59f83c4ea4d04620ad825889 /main/acl.c
parentcc7888ef69353e45d256fcae8112bd9fe7f77cf4 (diff)
For FreeBSD, at least, the ifa_addr element could be NULL.
(closes issue #12300) Reported by: festr Patches: acl.c.patch uploaded by festr (license 443) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@111442 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r--main/acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/acl.c b/main/acl.c
index e36008a04..72e354532 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -185,7 +185,7 @@ static int get_local_address(struct in_addr *ourip)
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
- if (ifap->ifa_addr->sa_family == AF_INET) {
+ if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
sin = (const struct sockaddr_in *) ifap->ifa_addr;
score_address(sin, &best_addr, &best_score);
res = 0;