refactor xml cdr and some cleanup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5778 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-02 16:38:15 +00:00
parent ff61ecfc73
commit cbac77fa9f
5 changed files with 57 additions and 36 deletions
+2 -1
View File
@@ -1523,8 +1523,9 @@ SWITCH_DECLARE(char *) switch_xml_toxml(switch_xml_t xml)
s = malloc(max);
assert(s != NULL);
memset(s, 0, max);
len = sprintf(s, "<?xml version=\"1.0\"?>\n");
if (!xml || !xml->name) {
if (!(r = realloc(s, len + 1))) {
abort();