mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-04 20:39:36 +00:00
Fix some memory leaks.
This commit is contained in:
parent
b88693f4f4
commit
f7abf57253
4 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue