]> granicus.if.org Git - php/commitdiff
Fixed memory leak
authorDmitry Stogov <dmitry@php.net>
Fri, 15 Sep 2006 07:11:35 +0000 (07:11 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 15 Sep 2006 07:11:35 +0000 (07:11 +0000)
ext/soap/soap.c

index d050c47fb931f19056acb0158ba6f8f029c669e9..e7f1999cea441320b8903506698668ff8c29313b 100644 (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);
                                }