Commit 84e54f6d authored by Pekka Pessi's avatar Pekka Pessi
Browse files

nua_register.c: nr->nr_tport was used even if nr was NULL

Problem detected by Klocwork.

darcs-hash:20080516090609-65a35-ee7d52f92fbc8d38046ed33d95ca13f94fe50482.gz
parent 0eee6627
......@@ -715,6 +715,7 @@ int nua_register_client_request(nua_client_request_t *cr,
sip_contact_t *m, *contacts = sip->sip_contact;
char const *min_expires = NULL;
int unreg;
tport_t *tport = NULL;
(void)nh;
......@@ -758,6 +759,8 @@ int nua_register_client_request(nua_client_request_t *cr,
if (previous)
sip_add_dup(msg, sip, (sip_header_t *)previous);
}
tport = nr->nr_tport;
}
for (m = sip->sip_contact; m; m = m->m_next) {
......@@ -792,7 +795,7 @@ int nua_register_client_request(nua_client_request_t *cr,
TAG_IF(unreg, NTATAG_SIGCOMP_CLOSE(1)),
TAG_IF(!unreg, NTATAG_COMP("sigcomp")),
#endif
NTATAG_TPORT(nr->nr_tport),
NTATAG_TPORT(tport),
TAG_NEXT(tags));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment