summaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2018-12-27 16:25:28 -0600
committerOlivier CrĂȘte <olivier.crete@collabora.com>2018-12-27 16:25:48 -0600
commitbf77d08882bab00549642aeac903560fd76a4a98 (patch)
tree67826dd7d6b663f4a0bf12f419aa33dcaeb2ebec /agent
parent928d21e925b2d41b96eaea87baefafc117bad71a (diff)
downloadlibnice-bf77d08882bab00549642aeac903560fd76a4a98.tar.gz
Fix little bugs found by clang-analyzer
Diffstat (limited to 'agent')
-rw-r--r--agent/agent.c2
-rw-r--r--agent/conncheck.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/agent/agent.c b/agent/agent.c
index d7ba019..3c1cdcd 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -5849,6 +5849,8 @@ nice_agent_set_software (NiceAgent *agent, const gchar *software)
if (software)
agent->software_attribute = g_strdup_printf ("%s/%s",
software, PACKAGE_STRING);
+ else
+ agent->software_attribute = NULL;
nice_agent_reset_all_stun_agents (agent, TRUE);
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 2974415..66290b3 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -3852,7 +3852,7 @@ static bool conncheck_stun_validater (StunAgent *agent,
ufrag = NULL;
if (cand->username)
ufrag = cand->username;
- else if (data->stream)
+ else
ufrag = data->stream->local_ufrag;
ufrag_len = ufrag? strlen (ufrag) : 0;
@@ -3873,7 +3873,7 @@ static bool conncheck_stun_validater (StunAgent *agent,
if (cand->password)
pass = cand->password;
- else if(data->stream->local_password[0])
+ else if (data->stream && data->stream->local_password[0])
pass = data->stream->local_password;
if (pass) {