pgsql: Fix memory leak in XMLSERIALIZE(... INDENT).

2025-05-22 Thread Tom Lane
Fix memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options sometimes tries to replace the existing root node of a libxml2 document. In that case xmlDocSetRootElement will unlink and return the old root node; if we fail to free it, it's leaked for the remainder of the session. The amount

pgsql: Fix memory leak in XMLSERIALIZE(... INDENT).

2025-05-22 Thread Tom Lane
Fix memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options sometimes tries to replace the existing root node of a libxml2 document. In that case xmlDocSetRootElement will unlink and return the old root node; if we fail to free it, it's leaked for the remainder of the session. The amount

pgsql: Fix memory leak in XMLSERIALIZE(... INDENT).

2025-05-22 Thread Tom Lane
Fix memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options sometimes tries to replace the existing root node of a libxml2 document. In that case xmlDocSetRootElement will unlink and return the old root node; if we fail to free it, it's leaked for the remainder of the session. The amount