]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11846 [mod_kazoo] fix queue cleanup
authorLuis Azedo <luis@2600hz.com>
Wed, 15 May 2019 12:24:12 +0000 (13:24 +0100)
committerLuis Azedo <luis@2600hz.com>
Wed, 15 May 2019 12:24:12 +0000 (13:24 +0100)
src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c

index 8d416a8317dd8aac09c6fe385383d56dc6868b38..5e5fb8dff4a8ce04568795e37db62b46b1375523 100644 (file)
@@ -349,8 +349,9 @@ static void *SWITCH_THREAD_FUNC event_stream_loop(switch_thread_t *thread, void
 
        /* clear and destroy any remaining queued events */
        while (switch_queue_trypop(event_stream->queue, &pop) == SWITCH_STATUS_SUCCESS) {
-               switch_event_t *event = (switch_event_t *) pop;
-               switch_event_destroy(&event);
+               ei_x_buff *ebuf = (ei_x_buff *) pop;
+               ei_x_free(ebuf);
+               switch_safe_free(ebuf);
        }
 
        /* remove the acceptor pollset */