mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed msi_session being used after being freed.
This commit is contained in:
parent
9d154029cb
commit
dfa483ba0d
|
@ -133,8 +133,6 @@ ToxAv *toxav_new( Tox *messenger, int32_t max_calls)
|
|||
*/
|
||||
void toxav_kill ( ToxAv *av )
|
||||
{
|
||||
msi_terminate_session(av->msi_session);
|
||||
|
||||
int i = 0;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
msi_terminate_session(av->msi_session);
|
||||
|
||||
free(av->calls);
|
||||
free(av);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user