mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
fix missing deref of root xml registry in xml_cdr that causes a hang
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5595 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0fbc8e5627
commit
0fe8934fec
@ -198,7 +198,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
|
|||||||
{
|
{
|
||||||
char *cf = "xml_cdr.conf";
|
char *cf = "xml_cdr.conf";
|
||||||
switch_xml_t cfg, xml, settings, param;
|
switch_xml_t cfg, xml, settings, param;
|
||||||
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
/* test global state handlers */
|
/* test global state handlers */
|
||||||
switch_core_add_state_handler(&state_handlers);
|
switch_core_add_state_handler(&state_handlers);
|
||||||
@ -252,13 +252,15 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
|
|||||||
if(!switch_strlen_zero(globals.url) && switch_strlen_zero(globals.errLogDir)) {
|
if(!switch_strlen_zero(globals.url) && switch_strlen_zero(globals.errLogDir)) {
|
||||||
if ((globals.errLogDir = switch_mprintf("%s/xml_cdr", SWITCH_GLOBAL_dirs.log_dir))) {
|
if ((globals.errLogDir = switch_mprintf("%s/xml_cdr", SWITCH_GLOBAL_dirs.log_dir))) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
||||||
return SWITCH_STATUS_FALSE;
|
status = SWITCH_STATUS_FALSE;
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* indicate that the module should continue to be loaded */
|
done:
|
||||||
return SWITCH_STATUS_SUCCESS;
|
switch_xml_free(xml);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user