diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index 9f93e419a9e..48cd7032178 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -220,7 +220,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset, xmlBufferWriteCHAR(buf, toptagname); xmlBufferWriteChar(buf, ">"); } - result = xmlStrdup(buf->content); + result = xmlStrdup(xmlBufferContent(buf)); xmlBufferFree(buf); return result; }