summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshugaley <54910986+shugaley@users.noreply.github.com>2022-07-28 21:57:37 +0300
committerGitHub <noreply@github.com>2022-07-28 11:57:37 -0700
commit8c6d7bc2b8787d58a582d40987aef979b0d7e9ed (patch)
treed3f991eff4a51f35ffe7b0e8cf4a960d5d12da51
parentc2e4320dd5f605924082da1d9b33326c805a431e (diff)
downloadopen-iscsi-8c6d7bc2b8787d58a582d40987aef979b0d7e9ed.tar.gz
Fix a possible passing null pointer in usr/iface.c (#356)
-rw-r--r--usr/iface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/iface.c b/usr/iface.c
index 8b15b7d..70527ed 100644
--- a/usr/iface.c
+++ b/usr/iface.c
@@ -1013,9 +1013,11 @@ static bool ipaddr_is_ipv6(char *ipaddr)
(second_colon != first_colon))
res = true;
}
- }
- log_debug(8, "%s(%s) -> %u",
- __FUNCTION__, ipaddr, res);
+ log_debug(8, "%s(%s) -> %u",
+ __FUNCTION__, ipaddr, res);
+ } else
+ log_debug(8, "%s(nil) -> %u",
+ __FUNCTION__, res);
return res;
}