summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-06-13 16:59:42 +0000
committerGordon Sim <gsim@apache.org>2013-06-13 16:59:42 +0000
commit2a75e9a88266e00c45d435e71d351f5e8f7bd398 (patch)
tree770c6ef9d6d177761de583e6933c4ba2ab92736f
parentf612854cf71573bf934248e4b862620be6e32715 (diff)
downloadqpid-python-2a75e9a88266e00c45d435e71d351f5e8f7bd398.tar.gz
QPID-4921: check pointer before using it
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1492761 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xcpp/src/qpid/sys/posix/SystemInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/posix/SystemInfo.cpp b/cpp/src/qpid/sys/posix/SystemInfo.cpp
index ea7f521f2b..2a42a5b2a7 100755
--- a/cpp/src/qpid/sys/posix/SystemInfo.cpp
+++ b/cpp/src/qpid/sys/posix/SystemInfo.cpp
@@ -111,7 +111,7 @@ namespace {
for (::ifaddrs* info = interfaceInfo; info != 0; info = info->ifa_next) {
// Only use IPv4/IPv6 interfaces
- if (!isInetOrInet6(info->ifa_addr)) continue;
+ if (!info->ifa_addr || !isInetOrInet6(info->ifa_addr)) continue;
int rc=::getnameinfo(info->ifa_addr, sa_len(info->ifa_addr),
name, sizeof(name), 0, 0,