summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorTom Lane2025-05-22 17:52:46 +0000
committerTom Lane2025-05-22 17:52:46 +0000
commitf24605e2dc1687917766f43775f0dcde2cf678a0 (patch)
tree215d04b8affbc0c141d0828b5169c3a9dcd42ff6 /src/backend/executor/nodeModifyTable.c
parent5d6eac80cdce7aa7c5f4ec74208ddc1feea9eef3 (diff)
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 of memory at stake is not large, a couple hundred bytes per occurrence, but that could still become annoying in heavy usage. Our only other xmlDocSetRootElement call is not at risk because it's working on a just-created document, but let's modify that code too to make it clear that it's dependent on that. Author: Tom Lane <[email protected]> Reviewed-by: Jim Jones <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 16
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions