From 045b76406277132386ed37b7c4037b7ea2059a9e Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 22 Oct 2013 15:44:50 -0500 Subject: [PATCH] Remove duplicated code --- src/mod/endpoints/mod_loopback/mod_loopback.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c index ee354ad90b..aea8032433 100644 --- a/src/mod/endpoints/mod_loopback/mod_loopback.c +++ b/src/mod/endpoints/mod_loopback/mod_loopback.c @@ -488,7 +488,6 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session) { switch_channel_t *channel = NULL; loopback_private_t *tech_pvt = NULL; - void *pop; switch_event_t *vars; channel = switch_core_session_get_channel(session); @@ -516,10 +515,7 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session) switch_frame_free(&tech_pvt->write_frame); } - while (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) { - switch_frame_t *frame = (switch_frame_t *) pop; - switch_frame_free(&frame); - } + clear_queue(tech_pvt); }