From 7e7b7f6c339d553d59dc648df667df8475ab7606 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 6 Feb 2015 15:13:36 -0500 Subject: [PATCH] Fixed memory leak. --- toxav/msi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toxav/msi.c b/toxav/msi.c index 497af13b..65e45a92 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -1287,11 +1287,14 @@ int msi_kill ( MSISession *session ) /* Cancel all? */ uint16_t _it = 0; /*for ( ; _it < session->calls[idx]->peer_count; _it++ ) - * FIXME: will not work on multiple peers, must cancel call for all peers - */ + * FIXME: will not work on multiple peers, must cancel call for all peers + */ msi_cancel ( session, idx, session->calls[idx]->peers [_it], "MSI session terminated!" ); } + free(((TimerHandler *)session->timer_handler)->timers); + free(session->timer_handler); + free ( session->calls ); pthread_mutex_unlock(session->mutex); pthread_mutex_destroy(session->mutex);