Commit bca71a5c authored by Pekka Pessi's avatar Pekka Pessi

nta.c: check input in nta_leg_by_uri()

Ignore-this: f149ac04b5e1bf078c3b00e837738301

Coverity issue.

parent 170a7f57
......@@ -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)
url_t *url;
nta_leg_t *leg;
nta_leg_t *leg = NULL;
if (!agent)
return NULL;
......@@ -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);
agent_aliases(agent, url, NULL);
leg = url ? dst_find(agent, url, NULL) : NULL;
su_free(NULL, url);
if (url) {
agent_aliases(agent, url, NULL);
leg = dst_find(agent, url, NULL);
su_free(NULL, url);
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