Fri May 16 05:06:09 EDT 2008 Pekka.Pessi@nokia.com

* nua_register.c: nr->nr_tport was used even if nr was NULL
  
  Problem detected by Klocwork.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8466 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-19 16:55:53 +00:00
parent 4795234198
commit c3c9a27413
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
Mon May 19 12:55:08 EDT 2008
Mon May 19 12:55:48 EDT 2008

View File

@ -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));
}