diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index 23d3f332dba..2820874cb5e 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -176,7 +176,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset, xmlBufferWriteCHAR(buf, toptagname); xmlBufferWriteChar(buf, ">"); } - result = xmlStrdup(buf->content); + result = xmlStrdup(xmlBufferContent(buf)); xmlBufferFree(buf); return result; }