Fix significant memory leak in contrib/xml2 functions.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 35a3def7b218f2264cf34385a8487a36f96e76ec
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-11-26T20:21:12Z
Releases: 8.1.23
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.

Files

PathChange+/−
contrib/xml2/xpath.c modified +90 −72