From: Mike Jerris Date: Wed, 5 Jul 2017 19:37:03 +0000 (-0500) Subject: FS-10388: [core] fix crash on shutdown when using multiple meida bugs X-Git-Tag: v1.8.0~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=379084eda03170f4117f9b62488caf715e401b6b;p=thirdparty%2Ffreeswitch.git FS-10388: [core] fix crash on shutdown when using multiple meida bugs --- diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 94fe4a4456..1178091b56 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -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); } }