From 25257f4a61d8c27a87a6128d446b74736b8e5f0a Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Thu, 23 Jan 2014 21:40:11 -0500 Subject: [PATCH] mod_rayo: fix memory leak in input component --- src/mod/event_handlers/mod_rayo/rayo_input_component.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/event_handlers/mod_rayo/rayo_input_component.c b/src/mod/event_handlers/mod_rayo/rayo_input_component.c index 064595eb72..d5631e43a4 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_input_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_input_component.c @@ -300,6 +300,7 @@ static switch_status_t input_handler_on_dtmf(switch_core_session_t *session, con for (component_to_remove = components_to_remove->headers; component_to_remove; component_to_remove = component_to_remove->next) { switch_core_hash_delete(handler->dtmf_components, component_to_remove->value); } + switch_event_destroy(&components_to_remove); } switch_mutex_unlock(handler->mutex); @@ -347,6 +348,7 @@ static switch_bool_t input_handler_bug_callback(switch_media_bug_t *bug, void *u for (component_to_remove = components_to_remove->headers; component_to_remove; component_to_remove = component_to_remove->next) { switch_core_hash_delete(handler->dtmf_components, component_to_remove->value); } + switch_event_destroy(&components_to_remove); } switch_core_media_bug_set_read_replace_frame(bug, rframe);