Fixed memory leak

This commit is contained in:
Dmitry Stogov 2006-09-15 07:11:35 +00:00
parent 7bf39e9212
commit ed26032176

View File

@ -3764,7 +3764,9 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
xmlAddChild(param, node);
if (fault_ns) {
xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
xmlNodeSetContent(node, xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0));
xmlChar *code = xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0);
xmlNodeSetContent(node, code);
xmlFree(code);
} else {
xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
}
@ -3787,7 +3789,9 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL);
if (fault_ns) {
xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
xmlNodeSetContent(node, xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0));
xmlChar *code = xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0);
xmlNodeSetContent(node, code);
xmlFree(code);
} else {
xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
}