summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_multimedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_multimedia.cpp')
-rw-r--r--protocols/Tox/src/tox_multimedia.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_multimedia.cpp b/protocols/Tox/src/tox_multimedia.cpp
index 0b0bfe87f2..0fe92349d5 100644
--- a/protocols/Tox/src/tox_multimedia.cpp
+++ b/protocols/Tox/src/tox_multimedia.cpp
@@ -121,6 +121,7 @@ void CToxOutgoingCall::OnCall(CCtrlBase*)
int friendNumber = m_proto->GetToxFriendNumber(hContact);
if (friendNumber == UINT32_MAX)
{
+ mir_free(cSettings);
Close();
return;
}
@@ -128,9 +129,11 @@ void CToxOutgoingCall::OnCall(CCtrlBase*)
int32_t callId;
if (toxav_call(m_proto->toxAv, &callId, friendNumber, cSettings, 10) == TOX_ERROR)
{
+ mir_free(cSettings);
m_proto->debugLogA(__FUNCTION__": failed to start outgoing call");
return;
}
+ mir_free(cSettings);
m_proto->calls[hContact] = callId;
char *message = NULL;