Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
8903615c
Commit
8903615c
authored
Jan 20, 2017
by
Sylvain Berfini
🎩
Browse files
Delete map when deleting friend list
parent
93b787c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
coreapi/friendlist.c
coreapi/friendlist.c
+4
-3
No files found.
coreapi/friendlist.c
View file @
8903615c
...
...
@@ -379,6 +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
(
list
->
friends_map
);
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES
(
LinphoneFriendList
);
...
...
@@ -581,14 +582,14 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
if
(
!
list
->
lc
->
friends_db_file
)
{
linphone_core_write_friends_config
(
list
->
lc
);
}
lf
->
friend_list
=
NULL
;
linphone_friend_unref
(
lf
);
list
->
friends
=
bctbx_list_erase_link
(
list
->
friends
,
elem
);
if
(
lf
->
refkey
)
{
bctbx_iterator_t
*
it
=
bctbx_map_cchar_find_key
(
list
->
friends_map
,
lf
->
refkey
);
bctbx_map_cchar_erase
(
list
->
friends_map
,
it
);
}
lf
->
friend_list
=
NULL
;
linphone_friend_unref
(
lf
);
return
LinphoneFriendListOK
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment