[Freeswitch-svn] [commit] r13256 - freeswitch/trunk/src/mod/event_handlers/mod_erlang_event
FreeSWITCH SVN
andrew at freeswitch.org
Thu May 7 15:13:05 PDT 2009
Author: andrew
Date: Thu May 7 17:13:05 2009
New Revision: 13256
Log:
Use switch_xml_parse_str_dynamic so we don't leak (thanks Math)
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c
Modified: freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c Thu May 7 17:13:05 2009
@@ -434,7 +434,7 @@
if (switch_strlen_zero(xmlstr)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Result\n");
- } else if (!(xml = switch_xml_parse_str(xmlstr, strlen(xmlstr)))) {
+ } else if (!(xml = switch_xml_parse_str_dynamic(xmlstr, strlen(xmlstr)))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Parsing XML Result!\n");
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "XML parsed OK!\n");
@@ -444,7 +444,6 @@
switch_core_hash_delete(ptr->listener->fetch_reply_hash, uuid_str);
switch_safe_free(rep->buff);
switch_safe_free(rep);
- switch_safe_free(xmlstr);
return xml;
}
More information about the Freeswitch-svn
mailing list