Fix significant memory leak in contrib/xml2 functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Nov 2010 20:20:51 +0000 (15:20 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Nov 2010 20:21:53 +0000 (15:21 -0500)
commit4a2516a7f976e2f6671930904d4e97a4832eff9f
tree744e57101f7c38bf7a27dff34c5560e57c81fb30
parente6e38b4ac21cc25fb8187e573a672ff17d9b2801
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.
contrib/xml2/xpath.c