]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_fifo: Fix memory leak of xml structure
authorTravis Cross <tc@traviscross.com>
Sun, 25 May 2014 14:48:47 +0000 (14:48 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 28 May 2014 01:32:00 +0000 (01:32 +0000)
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.

src/mod/applications/mod_fifo/mod_fifo.c

index 8a87e2d47364732c2526993b6e957e6903fbcb10..de82ff057529d1266a8e5f91ec9d84ce13c91481 100644 (file)
@@ -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);