From 5fd6299267bed8d3c633d7e692e4a3b55972ecf7 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Mon, 7 Oct 2019 20:54:52 +0400 Subject: [PATCH] [mod_hiredis] Xml object is not freed on load. --- src/mod/applications/mod_hiredis/hiredis_utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/applications/mod_hiredis/hiredis_utils.c b/src/mod/applications/mod_hiredis/hiredis_utils.c index e90ba6c1ee..ced3f589a2 100644 --- a/src/mod/applications/mod_hiredis/hiredis_utils.c +++ b/src/mod/applications/mod_hiredis/hiredis_utils.c @@ -115,10 +115,14 @@ switch_status_t mod_hiredis_do_config() goto err; } + switch_xml_free(xml); return SWITCH_STATUS_SUCCESS; err: switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Configuration failed\n"); + if (xml) { + switch_xml_free(xml); + } return SWITCH_STATUS_GENERR; }