Commit f85cf3e7 authored by Andrea Gianarda's avatar Andrea Gianarda
Browse files

Free allocated memory after usage

parent 9526e4c0
......@@ -472,7 +472,9 @@ void LocalConference::addLocalEndpoint () {
int LocalConference::inviteAddresses (const list<const LinphoneAddress *> &addresses, const LinphoneCallParams *params) {
for (const auto &address : addresses) {
LinphoneCall *call = linphone_core_get_call_by_remote_address2(getCore()->getCCore(), address);
Address cppAddress(linphone_address_as_string(address));
char *cAddress = linphone_address_as_string(address);
Address cppAddress(cAddress);
free(cAddress);
if (!call) {
/* Start a new call by indicating that it has to be put into the conference directly */
LinphoneCallParams *new_params;
......
......@@ -584,6 +584,13 @@ LinphoneStatus add_participant_to_local_conference_through_invite(bctbx_list_t *
}
}
if (participants_initial_stats) {
ms_free(participants_initial_stats);
}
if (existing_call) {
ms_free(existing_call);
}
return status;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment