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

index 088343a6b8e12244434bf799d0227ea20396858a..91d3a07181185adf5c6f8af57da361c4e27b1a75 100644 (file)
@@ -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);
                                }