mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Set pointer to NULL when freeing to fix issue.
This commit is contained in:
parent
9445b40fb5
commit
d4218dcd61
|
@ -569,6 +569,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index )
|
|||
|
||||
for (i = 0; i != VIDEO_DECODE_QUEUE_SIZE; i++) {
|
||||
p = call->video_decode_queue[i];
|
||||
call->video_decode_queue[i] = NULL;
|
||||
|
||||
if (p) {
|
||||
free(p);
|
||||
|
@ -577,6 +578,7 @@ int toxav_kill_transmission ( ToxAv *av, int32_t call_index )
|
|||
|
||||
for (i = 0; i != AUDIO_DECODE_QUEUE_SIZE; i++) {
|
||||
p = call->audio_decode_queue[i];
|
||||
call->audio_decode_queue[i] = NULL;
|
||||
|
||||
if (p) {
|
||||
free(p);
|
||||
|
|
Loading…
Reference in New Issue
Block a user