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
f7abf572
Commit
f7abf572
authored
Mar 09, 2016
by
Ghislain MARY
Browse files
Fix some memory leaks.
parent
b88693f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
coreapi/event.c
coreapi/event.c
+2
-2
coreapi/friendlist.c
coreapi/friendlist.c
+0
-1
coreapi/proxy.c
coreapi/proxy.c
+1
-0
tester/presence_tester.c
tester/presence_tester.c
+5
-0
No files found.
coreapi/event.c
View file @
f7abf572
...
...
@@ -358,8 +358,8 @@ LinphoneEvent *linphone_event_ref(LinphoneEvent *lev){
}
static
void
linphone_event_destroy
(
LinphoneEvent
*
lev
){
if
(
lev
->
op
)
sal_op_release
(
lev
->
op
);
if
(
lev
->
op
)
sal_op_release
(
lev
->
op
);
if
(
lev
->
send_custom_headers
)
sal_custom_header_free
(
lev
->
send_custom_headers
);
ms_free
(
lev
->
name
);
}
...
...
coreapi/friendlist.c
View file @
f7abf572
...
...
@@ -623,7 +623,6 @@ void linphone_friend_list_update_subscriptions(LinphoneFriendList *list, Linphon
linphone_event_unref
(
list
->
event
);
}
list
->
event
=
linphone_core_create_subscribe
(
list
->
lc
,
address
,
"presence"
,
expires
);
linphone_event_ref
(
list
->
event
);
linphone_event_set_internal
(
list
->
event
,
TRUE
);
linphone_event_add_custom_header
(
list
->
event
,
"Require"
,
"recipient-list-subscribe"
);
linphone_event_add_custom_header
(
list
->
event
,
"Supported"
,
"eventlist"
);
...
...
coreapi/proxy.c
View file @
f7abf572
...
...
@@ -1111,6 +1111,7 @@ int linphone_proxy_config_send_publish(LinphoneProxyConfig *proxy, LinphonePrese
linphone_content_set_subtype
(
content
,
"pidf+xml"
);
err
=
linphone_event_send_publish
(
proxy
->
long_term_event
,
content
);
linphone_content_unref
(
content
);
ms_free
(
presence_body
);
}
else
proxy
->
send_publish
=
TRUE
;
/*otherwise do not send publish if registration is in progress, this will be done later*/
return
err
;
}
...
...
tester/presence_tester.c
View file @
f7abf572
...
...
@@ -728,10 +728,13 @@ static void test_presence_list_base(bool_t enable_compression) {
linphone_friend_list_set_rls_uri
(
lfl
,
rls_uri
);
lf
=
linphone_core_create_friend_with_address
(
laure
->
lc
,
marie_identity
);
linphone_friend_list_add_friend
(
lfl
,
lf
);
linphone_friend_unref
(
lf
);
lf
=
linphone_core_create_friend_with_address
(
laure
->
lc
,
pauline_identity
);
linphone_friend_list_add_friend
(
lfl
,
lf
);
linphone_friend_unref
(
lf
);
lf
=
linphone_core_create_friend_with_address
(
laure
->
lc
,
"sip:michelle@sip.inexistentdomain.com"
);
linphone_friend_list_add_friend
(
lfl
,
lf
);
linphone_friend_unref
(
lf
);
linphone_core_remove_friend_list
(
laure
->
lc
,
linphone_core_get_default_friend_list
(
laure
->
lc
));
linphone_core_add_friend_list
(
laure
->
lc
,
lfl
);
linphone_friend_list_unref
(
lfl
);
...
...
@@ -761,6 +764,7 @@ static void test_presence_list_base(bool_t enable_compression) {
linphone_friend_list_set_rls_uri
(
lfl
,
rls_uri
);
lf
=
linphone_core_create_friend_with_address
(
marie
->
lc
,
laure_identity
);
linphone_friend_list_add_friend
(
lfl
,
lf
);
linphone_friend_unref
(
lf
);
linphone_core_remove_friend_list
(
marie
->
lc
,
linphone_core_get_default_friend_list
(
marie
->
lc
));
linphone_core_add_friend_list
(
marie
->
lc
,
lfl
);
linphone_friend_list_unref
(
lfl
);
...
...
@@ -778,6 +782,7 @@ static void test_presence_list_base(bool_t enable_compression) {
linphone_friend_list_set_rls_uri
(
lfl
,
rls_uri
);
lf
=
linphone_core_create_friend_with_address
(
pauline
->
lc
,
marie_identity
);
linphone_friend_list_add_friend
(
lfl
,
lf
);
linphone_friend_unref
(
lf
);
linphone_core_remove_friend_list
(
pauline
->
lc
,
linphone_core_get_default_friend_list
(
pauline
->
lc
));
linphone_core_add_friend_list
(
pauline
->
lc
,
lfl
);
linphone_friend_list_unref
(
lfl
);
...
...
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