From 90438ffe789315bb3000462c9393d16737720476 Mon Sep 17 00:00:00 2001 From: Luis Azedo Date: Wed, 15 May 2019 13:24:12 +0100 Subject: [PATCH] FS-11846 [mod_kazoo] fix queue cleanup --- src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c b/src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c index 8d416a8317..5e5fb8dff4 100644 --- a/src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c +++ b/src/mod/event_handlers/mod_kazoo/kazoo_event_stream.c @@ -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 */