pgsql: Fix significant memory leak in contrib/xml2 functions. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix significant memory leak in contrib/xml2 functions.
Date
Msg-id E1PM4oD-0001TS-6F@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix significant memory leak in contrib/xml2 functions.

Most of the functions that execute XPath queries leaked the data structures
created by libxml2.  This memory would not be recovered until end of
session, so it mounts up pretty quickly in any serious use of the feature.
Per report from Pavel Stehule, though this isn't his patch.

Back-patch to all supported branches.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=61f86180169cda1168a2f4829f3289323d7ec7ae

Modified Files
--------------
contrib/xml2/xpath.c |  162 ++++++++++++++++++++++++++++----------------------
1 files changed, 90 insertions(+), 72 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Add inet_net_ntop.c as needed by MSVC, per Magnus.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix significant memory leak in contrib/xml2 functions.