diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index 212cb74aa22..94bb31434c8 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -174,7 +174,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset, xmlBufferWriteCHAR(buf, toptagname); xmlBufferWriteChar(buf, ">"); } - result = xmlStrdup(buf->content); + result = xmlStrdup(xmlBufferContent(buf)); xmlBufferFree(buf); return result; }