FS-10388: [core] fix crash on shutdown when using multiple meida bugs

This commit is contained in:
Mike Jerris 2017-07-05 14:37:03 -05:00
parent 5d4ee9a851
commit acc9821ef6
1 changed files with 2 additions and 1 deletions

View File

@ -1253,7 +1253,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_remove_all_function(switch
}
if (closed) {
for (bp = session->bugs; bp; bp = bp->next) {
for (bp = session->bugs; bp; bp = next) {
next = bp->next;
switch_core_media_bug_destroy(&bp);
}
}