Commit 536c7c30 authored by Matthieu Tanon's avatar Matthieu Tanon Committed by François Grisez

Fix memory leak when removing duplicate auth events

parent 71179f78
......@@ -1322,8 +1322,10 @@ int belle_sip_provider_add_authorization(belle_sip_provider_t *p, belle_sip_requ
/*stored to give user information on realm/username which requires authentications*/
*auth_infos=belle_sip_list_append(*auth_infos,auth_event);
belle_sip_list_t* elem=belle_sip_list_find_double_events(*auth_infos,auth_event);
if(elem!=NULL)
if(elem!=NULL) {
belle_sip_auth_event_destroy(bctbx_list_get_data(elem));
*auth_infos=belle_sip_list_delete_link(*auth_infos,elem);
}
} else {
belle_sip_auth_event_destroy(auth_event);
}
......
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