summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/netsock2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/netsock2.c b/main/netsock2.c
index 6f55b3b3b..25f15a2fc 100644
--- a/main/netsock2.c
+++ b/main/netsock2.c
@@ -232,6 +232,10 @@ int ast_sockaddr_resolve(struct ast_sockaddr **addrs, const char *str,
char *s, *host, *port;
int e, i, res_cnt;
+ if (!str) {
+ return 0;
+ }
+
s = ast_strdupa(str);
if (!ast_sockaddr_split_hostport(s, &host, &port, flags)) {
return 0;