Fixed msi_session being used after being freed.

This commit is contained in:
irungentoo 2014-07-05 21:49:47 -04:00
parent 9d154029cb
commit dfa483ba0d
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -133,8 +133,6 @@ ToxAv *toxav_new( Tox *messenger, int32_t max_calls)
*/ */
void toxav_kill ( ToxAv *av ) void toxav_kill ( ToxAv *av )
{ {
msi_terminate_session(av->msi_session);
int i = 0; int i = 0;
for (; i < av->max_calls; i ++) { for (; i < av->max_calls; i ++) {
@ -152,6 +150,8 @@ void toxav_kill ( ToxAv *av )
if ( av->calls[i].cs ) codec_terminate_session(av->calls[i].cs); if ( av->calls[i].cs ) codec_terminate_session(av->calls[i].cs);
} }
msi_terminate_session(av->msi_session);
free(av->calls); free(av->calls);
free(av); free(av);
} }