]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10388: [core] fix crash on shutdown when using multiple meida bugs
authorMike Jerris <mike@jerris.com>
Wed, 5 Jul 2017 19:37:03 +0000 (14:37 -0500)
committerMike Jerris <mike@jerris.com>
Wed, 5 Jul 2017 19:37:32 +0000 (14:37 -0500)
src/switch_core_media_bug.c

index 94fe4a445635f683a20689aaafdfdbb12cc7d4f2..1178091b56705f3357c90870afbc439eb7f75980 100644 (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);
                }
        }