mirror of
https://github.com/postgres/postgres.git
synced 2026-06-19 21:49:02 -04:00
Several objects were allocated by libxml2 and never released in some
error or even success paths, leading to some memory leaks that would
stack across SQL calls:
- In pgxml_xpath(), the result of xmlXPathCompiledEval() could leak.
This now uses a TRY/CATCH block to ensure a correct cleanup of a
workspace on failure.
- In xpath_table() missed some objects not freed on failure. Some
xmlFree() calls were missing for the results copied after a success.
- In pgxmlNodeSetToText(), xmlXPathCastNodeToString() allocates a result
that the caller is responsible for freeing. It was not freed.
Most of the work of this commit stands on top of
|
||
|---|---|---|
| .. | ||
| expected | ||
| sql | ||
| .gitignore | ||
| Makefile | ||
| meson.build | ||
| xml2--1.0--1.1.sql | ||
| xml2--1.1--1.2.sql | ||
| xml2--1.1.sql | ||
| xml2.control | ||
| xpath.c | ||
| xslt_proc.c | ||