Fix low-probability memory leak in XMLSERIALIZE(... INDENT). xmltotext_with_options() did not consider the possibility that pg_xml_init() could fail --- most likely due to OOM. If that happened, the already-parsed xmlDoc structure would be leaked. Oversight in commit 483bdb2af.
Bug: #18981 Author: Dmitry Kovalenko <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 16 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e03c95287764158941d317972a332565729b6af2 Modified Files -------------- src/backend/utils/adt/xml.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
