diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index 19acc6e8c..023583528 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -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); diff --git a/tester/vcard_tester.c b/tester/vcard_tester.c index e4f80e0f4..d47d01dab 100644 --- a/tester/vcard_tester.c +++ b/tester/vcard_tester.c @@ -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: