Commit 2f3b3ca5 authored by Youness Alaoui's avatar Youness Alaoui

Correctly free memory from the validater

parent 4433a925
...@@ -1798,8 +1798,10 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream, ...@@ -1798,8 +1798,10 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
valid = stun_agent_validate (&agent->stun_agent, &req, (uint8_t *) buf, len, valid = stun_agent_validate (&agent->stun_agent, &req, (uint8_t *) buf, len,
stun_agent_default_validater, validater_data); stun_agent_default_validater, validater_data);
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { for (k = 0; k < j; k++) {
g_free (validater_data[0].password); g_free(validater_data[k].username);
if (agent->compatibility == NICE_COMPATIBILITY_MSN)
g_free(validater_data[k].password);
} }
if (valid == STUN_VALIDATION_NOT_STUN || if (valid == STUN_VALIDATION_NOT_STUN ||
......
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