From: Anthony Minessale Date: Wed, 25 Feb 2009 00:46:51 +0000 (+0000) Subject: FSCORE-309 X-Git-Tag: v1.0.4~1837 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b1a2e21a65334e26a24ccd136175deb85c23c34;p=thirdparty%2Ffreeswitch.git FSCORE-309 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12268 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_xml.c b/src/switch_xml.c index 53b5f67f07..e5b77826fb 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1552,10 +1552,13 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section, if ((conf = switch_xml_find_child(xml, "section", "name", section)) && (tag = switch_xml_find_child(conf, tag_name, key_name, key_value))) { if (clone) { - char *x = switch_xml_toxml(tag, SWITCH_FALSE); + char *x; + switch_mutex_lock(XML_LOCK); + x = switch_xml_toxml(tag, SWITCH_FALSE); switch_assert(x); *root = switch_xml_parse_str(x, strlen(x)); *node = *root; + switch_mutex_unlock(XML_LOCK); switch_xml_free(xml); } else { *node = tag;