fix memory leak

This commit is contained in:
Benjamin Reis 2017-01-20 16:00:07 +01:00
parent 7f65973bd6
commit 54081aaee0
2 changed files with 1 additions and 3 deletions

View file

@ -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);

View file

@ -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: