mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Fix memory leak with c-wrapper for calls.
This commit is contained in:
parent
d8c2df970b
commit
c41132f31d
2 changed files with 2 additions and 2 deletions
|
|
@ -3728,7 +3728,7 @@ LinphoneStatus linphone_core_decline_call(LinphoneCore *lc, LinphoneCall *call,
|
|||
|
||||
const bctbx_list_t *linphone_core_get_calls(LinphoneCore *lc) {
|
||||
if (lc->callsCache) {
|
||||
bctbx_list_free(lc->callsCache);
|
||||
bctbx_list_free_with_data(lc->callsCache, (bctbx_list_free_func)linphone_call_unref);
|
||||
lc->callsCache = NULL;
|
||||
}
|
||||
lc->callsCache = L_GET_RESOLVED_C_LIST_FROM_CPP_LIST(L_GET_CPP_PTR_FROM_C_OBJECT(lc)->getCalls());
|
||||
|
|
|
|||
|
|
@ -42,6 +42,6 @@ static void _linphone_core_constructor (LinphoneCore *lc) {
|
|||
|
||||
static void _linphone_core_destructor (LinphoneCore *lc) {
|
||||
if (lc->callsCache)
|
||||
bctbx_list_free(lc->callsCache);
|
||||
bctbx_list_free_with_data(lc->callsCache, (bctbx_list_free_func)linphone_call_unref);
|
||||
_linphone_core_uninit(lc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue