Fix significant memory leak in contrib/xml2 functions.
authorTom Lane <[email protected]>
Fri, 26 Nov 2010 20:21:04 +0000 (15:21 -0500)
committerTom Lane <[email protected]>
Fri, 26 Nov 2010 20:21:04 +0000 (15:21 -0500)
commit301a822aa0d4c066da06f5d2979699edc14ec0fa
tree0e890554009dbbdd9c3c6e3f6f48bbc7b5aace48
parent0a8ba868a8d05f158d0f3d151a9d68f26e9e0329
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