Commit 93756ed6 authored by Olivier Crête's avatar Olivier Crête

g_free is NULL-safe

parent 88bf95fe
...@@ -2655,8 +2655,6 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream, ...@@ -2655,8 +2655,6 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
} }
} }
if (validater_data.password)
g_free (validater_data.password); g_free (validater_data.password);
if (valid == STUN_VALIDATION_NOT_STUN || if (valid == STUN_VALIDATION_NOT_STUN ||
......
...@@ -407,9 +407,7 @@ void priv_generate_candidate_credentials (NiceAgent *agent, ...@@ -407,9 +407,7 @@ void priv_generate_candidate_credentials (NiceAgent *agent,
guchar username[32]; guchar username[32];
guchar password[16]; guchar password[16];
if (candidate->username)
g_free (candidate->username); g_free (candidate->username);
if (candidate->password)
g_free (candidate->password); g_free (candidate->password);
nice_rng_generate_bytes (agent->rng, 32, (gchar *)username); nice_rng_generate_bytes (agent->rng, 32, (gchar *)username);
...@@ -421,9 +419,7 @@ void priv_generate_candidate_credentials (NiceAgent *agent, ...@@ -421,9 +419,7 @@ void priv_generate_candidate_credentials (NiceAgent *agent,
} else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { } else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) {
gchar username[16]; gchar username[16];
if (candidate->username)
g_free (candidate->username); g_free (candidate->username);
if (candidate->password)
g_free (candidate->password); g_free (candidate->password);
candidate->password = NULL; candidate->password = NULL;
......
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