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
35268a12
Commit
35268a12
authored
Sep 06, 2017
by
Ronan
Browse files
fix(call): avoid memory leak
parent
14d74d75
Changes
1
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecall.c
View file @
35268a12
...
...
@@ -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
){
...
...
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