From 581a55889ba7f76dd87a270e37e5137f684bfdb7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 7 Nov 2019 09:54:09 +0100 Subject: Fix nested error handling in PG_FINALLY We need to pop the error stack before running the user-supplied PG_FINALLY code. Otherwise an error in the cleanup code would end up at the same sigsetjmp() invocation and result in an infinite error handling loop. Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/95a822c3-728b-af0e-d7e5-71890507ae0c%402ndquadrant.com --- src/backend/utils/adt/xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/utils/adt/xml.c') diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 3bc17164312..1ec16f49b29 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -3868,7 +3868,7 @@ xml_xmlnodetoxmltype(xmlNodePtr cur, PgXmlErrorContext *xmlerrcxt) result = xmlBuffer_to_xmltype(buf); } - PG_FINALLY() + PG_FINALLY(); { if (nodefree) nodefree(cur_copy); -- cgit v1.2.3