Fixed memory leak.

This commit is contained in:
irungentoo 2015-02-06 15:13:36 -05:00
parent 66b27fc538
commit 7e7b7f6c33
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -1287,11 +1287,14 @@ int msi_kill ( MSISession *session )
/* Cancel all? */ /* Cancel all? */
uint16_t _it = 0; uint16_t _it = 0;
/*for ( ; _it < session->calls[idx]->peer_count; _it++ ) /*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!" ); 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 ); free ( session->calls );
pthread_mutex_unlock(session->mutex); pthread_mutex_unlock(session->mutex);
pthread_mutex_destroy(session->mutex); pthread_mutex_destroy(session->mutex);