Commit bca71a5c authored by Pekka Pessi's avatar Pekka Pessi

nta.c: check input in nta_leg_by_uri()

Ignore-this: f149ac04b5e1bf078c3b00e837738301

Coverity issue.

darcs-hash:20090512181707-db55f-29553eaeca4eb14796a7123463e084cf8de1a784.gz
parent 170a7f57
...@@ -4896,7 +4896,7 @@ nta_leg_t *leg_find(nta_agent_t const *sa, ...@@ -4896,7 +4896,7 @@ nta_leg_t *leg_find(nta_agent_t const *sa,
nta_leg_t *nta_leg_by_uri(nta_agent_t const *agent, url_string_t const *us) nta_leg_t *nta_leg_by_uri(nta_agent_t const *agent, url_string_t const *us)
{ {
url_t *url; url_t *url;
nta_leg_t *leg; nta_leg_t *leg = NULL;
if (!agent) if (!agent)
return NULL; return NULL;
...@@ -4906,11 +4906,11 @@ nta_leg_t *nta_leg_by_uri(nta_agent_t const *agent, url_string_t const *us) ...@@ -4906,11 +4906,11 @@ nta_leg_t *nta_leg_by_uri(nta_agent_t const *agent, url_string_t const *us)
url = url_hdup(NULL, us->us_url); url = url_hdup(NULL, us->us_url);
agent_aliases(agent, url, NULL); if (url) {
agent_aliases(agent, url, NULL);
leg = url ? dst_find(agent, url, NULL) : NULL; leg = dst_find(agent, url, NULL);
su_free(NULL, url);
su_free(NULL, url); }
return leg; return leg;
} }
......
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