skypiax: switch_xml_free() the configuration if module failed to load, because otherwise reloadxml will stuck forever (reported by Seven Du)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14415 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Giovanni Maruzzelli 2009-07-29 18:32:33 +00:00
parent 1296896264
commit 45f38f17eb
1 changed files with 3 additions and 0 deletions

View File

@ -928,6 +928,7 @@ static switch_status_t load_config(int reload_type)
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
ERRORA("open of %s failed\n", SKYPIAX_P_LOG, cf);
running = 0;
switch_xml_free(xml);
return SWITCH_STATUS_TERM;
}
@ -1224,6 +1225,7 @@ static switch_status_t load_config(int reload_type)
("Failed to connect to a SKYPE API for interface_id=%d, no SKYPE client running, please (re)start Skype client. Skypiax exiting\n",
SKYPIAX_P_LOG, interface_id);
running = 0;
switch_xml_free(xml);
return SWITCH_STATUS_FALSE;
}
@ -1247,6 +1249,7 @@ static switch_status_t load_config(int reload_type)
interface_id, globals.SKYPIAX_INTERFACES[interface_id].skype_user,
globals.SKYPIAX_INTERFACES[interface_id].skype_user);
running = 0;
switch_xml_free(xml);
return SWITCH_STATUS_FALSE;
}