]> 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>
Tue, 11 Jul 2017 17:06:15 +0000 (13:06 -0400)
src/switch_core_media_bug.c

index c3948de0ab7e2a367209113a74ada8a79bb3d87f..e14c72026e608040c65eeee7aa29ce9b3f138f0e 100644 (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);
                }
        }