From: Dmitry Stogov Date: Fri, 15 Sep 2006 07:11:09 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: RELEASE_1_0_0RC1~1670 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=251bb2d7e187f93a992e729a171a4b085954f853;p=php Fixed memory leak --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 088343a6b8..91d3a07181 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -4214,7 +4214,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); } @@ -4237,7 +4239,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); }