1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-03-02 17:03:52 +00:00

[sofia-sip] scan-build: Access to field 'ai_addr' results in a dereference of a null pointer (loaded from variable 'res')

This commit is contained in:
Dragos Oancea 2020-02-12 01:39:18 +00:00
parent 1b66e76548
commit 356a403a17

@ -1661,6 +1661,8 @@ int tport_bind_server(tport_master_t *mr,
for (tbf = &mr->mr_primaries; *tbf; tbf = &(*tbf)->pri_next) for (tbf = &mr->mr_primaries; *tbf; tbf = &(*tbf)->pri_next)
; ;
if (!res)
return -1;
port = port0 = port1 = ntohs(((su_sockaddr_t *)res->ai_addr)->su_port); port = port0 = port1 = ntohs(((su_sockaddr_t *)res->ai_addr)->su_port);
error = EPROTONOSUPPORT; error = EPROTONOSUPPORT;