Commit 54081aae authored by Benjamin REIS's avatar Benjamin REIS

fix memory leak

parent 7f65973b
......@@ -379,7 +379,7 @@ static void linphone_friend_list_destroy(LinphoneFriendList *list) {
if (list->cbs) linphone_friend_list_cbs_unref(list->cbs);
if (list->dirty_friends_to_update) list->dirty_friends_to_update = bctbx_list_free_with_data(list->dirty_friends_to_update, (void (*)(void *))linphone_friend_unref);
if (list->friends) list->friends = bctbx_list_free_with_data(list->friends, (void (*)(void *))_linphone_friend_release);
if (list->friends_map) bctbx_mmap_cchar_delete_with_data(list->friends_map, (void (*)(void *))_linphone_friend_release);
if (list->friends_map) bctbx_mmap_cchar_delete_with_data(list->friends_map, (void (*)(void *))linphone_friend_unref);
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneFriendList);
......
......@@ -808,7 +808,6 @@ static void find_friend_by_ref_key_test(void) {
addr = linphone_friend_get_address(lf2);
BC_ASSERT_STRING_EQUAL(linphone_address_as_string_uri_only(addr), "sip:toto@sip.linphone.org");
BC_ASSERT_EQUAL(lf2, lf, void*, "%p");
linphone_friend_unref(lf2);
end:
linphone_friend_unref(lf);
linphone_core_manager_destroy(manager);
......@@ -820,7 +819,6 @@ static void find_friend_by_ref_key_empty_list_test(void) {
lf2 = linphone_friend_list_find_friend_by_ref_key(lfl, "totorefkey");
BC_ASSERT_PTR_NULL(lf2);
if (lf2) {
linphone_friend_unref(lf2);
goto end;
}
end:
......
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