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 38ff0f79e9
commit 379084eda0
1 changed files with 2 additions and 1 deletions

View File

@ -1270,7 +1270,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);
}
}