void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
MSList *el=ms_list_find(lc->friends,(void *)fl);
if (el!=NULL){
- lc->friends=ms_list_remove_link(lc->friends,el);
linphone_friend_destroy((LinphoneFriend*)el->data);
+ lc->friends=ms_list_remove_link(lc->friends,el);
linphone_core_write_friends_config(lc);
}
}