mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(call): avoid memory leak
This commit is contained in:
parent
14d74d7529
commit
35268a12e6
1 changed files with 11 additions and 6 deletions
|
|
@ -5016,12 +5016,17 @@ static LinphoneAddress *get_fixed_contact(LinphoneCore *lc, LinphoneCall *call ,
|
|||
}
|
||||
|
||||
void linphone_call_set_contact_op(LinphoneCall* call) {
|
||||
LinphoneAddress *contact;
|
||||
contact=get_fixed_contact(call->core,call,call->dest_proxy);
|
||||
sal_op_set_and_clean_contact_address(
|
||||
call->op,
|
||||
contact ? (SalAddress *)L_GET_PRIVATE_FROM_C_STRUCT(contact, Address)->getInternalAddress() : nullptr
|
||||
);
|
||||
SalAddress *sal_address = nullptr;
|
||||
{
|
||||
LinphoneAddress *contact = get_fixed_contact(call->core,call,call->dest_proxy);
|
||||
if (contact) {
|
||||
sal_address = const_cast<SalAddress *>(L_GET_PRIVATE_FROM_C_STRUCT(contact, Address)->getInternalAddress());
|
||||
sal_address_ref(sal_address);
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
}
|
||||
|
||||
sal_op_set_and_clean_contact_address(call->op, sal_address);
|
||||
}
|
||||
|
||||
LinphonePlayer *linphone_call_get_player(LinphoneCall *call){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue