Commit 78d75e83 authored by Youness Alaoui's avatar Youness Alaoui

We should not free the username/password used for authenticating until the...

We should not free the username/password used for authenticating until the candidate discovery is also freed, otherwise we can't authenticate the response
parent 959235aa
...@@ -98,6 +98,8 @@ void discovery_free_item (gpointer data, gpointer user_data) ...@@ -98,6 +98,8 @@ void discovery_free_item (gpointer data, gpointer user_data)
{ {
CandidateDiscovery *cand = data; CandidateDiscovery *cand = data;
g_assert (user_data == NULL); g_assert (user_data == NULL);
g_free (cand->msn_turn_username);
g_free (cand->msn_turn_password);
g_slice_free (CandidateDiscovery, cand); g_slice_free (CandidateDiscovery, cand);
} }
...@@ -717,8 +719,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer) ...@@ -717,8 +719,8 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
priv_agent_to_turn_compatibility (agent)); priv_agent_to_turn_compatibility (agent));
if (agent->compatibility == NICE_COMPATIBILITY_MSN) { if (agent->compatibility == NICE_COMPATIBILITY_MSN) {
g_free (username); cand->msn_turn_username = username;
g_free (password); cand->msn_turn_password = password;
} }
} }
......
...@@ -57,6 +57,8 @@ struct _CandidateDiscovery ...@@ -57,6 +57,8 @@ struct _CandidateDiscovery
Stream *stream; Stream *stream;
Component *component; Component *component;
StunAgent turn_agent; StunAgent turn_agent;
uint8_t *msn_turn_username;
uint8_t *msn_turn_password;
stun_timer_t timer; stun_timer_t timer;
uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE]; uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
StunMessage stun_message; StunMessage stun_message;
......
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