summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-05 21:49:47 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-05 21:49:47 -0400
commitdfa483ba0d440519b044f831b3349a562df003e0 (patch)
tree5cf5e4d01916ae481fc75752148ca3c405161ab5 /toxav/toxav.c
parent9d154029cb0141d78cdfca74fa2a1177b88bc677 (diff)
Fixed msi_session being used after being freed.
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 81196af9..151a1e64 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -133,8 +133,6 @@ ToxAv *toxav_new( Tox *messenger, int32_t max_calls)
133 */ 133 */
134void toxav_kill ( ToxAv *av ) 134void toxav_kill ( ToxAv *av )
135{ 135{
136 msi_terminate_session(av->msi_session);
137
138 int i = 0; 136 int i = 0;
139 137
140 for (; i < av->max_calls; i ++) { 138 for (; i < av->max_calls; i ++) {
@@ -152,6 +150,8 @@ void toxav_kill ( ToxAv *av )
152 if ( av->calls[i].cs ) codec_terminate_session(av->calls[i].cs); 150 if ( av->calls[i].cs ) codec_terminate_session(av->calls[i].cs);
153 } 151 }
154 152
153 msi_terminate_session(av->msi_session);
154
155 free(av->calls); 155 free(av->calls);
156 free(av); 156 free(av);
157} 157}