From: Dmitry Stogov Date: Fri, 15 Sep 2006 07:11:35 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: php-5.2.0RC5~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed260321769d8e713871ad8bda5e318b817b3641;p=php Fixed memory leak --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d050c47fb9..e7f1999cea 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -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); }