From: Travis Cross Date: Sun, 25 May 2014 14:48:47 +0000 (+0000) Subject: mod_fifo: Fix memory leak of xml structure X-Git-Tag: v1.4.5~2^2~14^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2068b284ccd9d6312e75a571d85aefc3305788d6;p=thirdparty%2Ffreeswitch.git mod_fifo: Fix memory leak of xml structure If getting the DB handle failed during the load or reload of the configuration, we would leak the XML structure we just allocated for the configuration. --- diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 8a87e2d473..de82ff0575 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -4628,10 +4628,10 @@ static switch_status_t load_config(int reload, int del_all) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s configured\n", node->name); } } - switch_xml_free(xml); done: + switch_xml_free(xml); if (reload) { fifo_node_t *node; switch_mutex_lock(globals.mutex);