diff options
author | irungentoo <irungentoo@gmail.com> | 2014-08-04 12:40:18 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-08-04 12:40:18 -0400 |
commit | d4218dcd6124751c5978183531db144398485a94 (patch) | |
tree | d902a970f7a74effb0a2e684750b671a83b24f36 | |
parent | 9445b40fb55d6d7ed9da3744de6fcabc61963167 (diff) |
Set pointer to NULL when freeing to fix issue.
-rw-r--r-- | toxav/toxav.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 351ec183..11eafcb5 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -569,6 +569,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index ) | |||
569 | 569 | ||
570 | for (i = 0; i != VIDEO_DECODE_QUEUE_SIZE; i++) { | 570 | for (i = 0; i != VIDEO_DECODE_QUEUE_SIZE; i++) { |
571 | p = call->video_decode_queue[i]; | 571 | p = call->video_decode_queue[i]; |
572 | call->video_decode_queue[i] = NULL; | ||
572 | 573 | ||
573 | if (p) { | 574 | if (p) { |
574 | free(p); | 575 | free(p); |
@@ -577,6 +578,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index ) | |||
577 | 578 | ||
578 | for (i = 0; i != AUDIO_DECODE_QUEUE_SIZE; i++) { | 579 | for (i = 0; i != AUDIO_DECODE_QUEUE_SIZE; i++) { |
579 | p = call->audio_decode_queue[i]; | 580 | p = call->audio_decode_queue[i]; |
581 | call->audio_decode_queue[i] = NULL; | ||
580 | 582 | ||
581 | if (p) { | 583 | if (p) { |
582 | free(p); | 584 | free(p); |