1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

xpath: Report malloc failure in xmlXPtrEvalXPtrPart

This commit is contained in:
Nick Wellnhofer 2024-01-10 16:02:33 +01:00
parent 2cebf2098d
commit 29f4d69e2f

View File

@ -1059,7 +1059,8 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
NEXT;
SKIP_BLANKS;
xmlXPathRegisterNs(ctxt->context, prefix, ctxt->cur);
if (xmlXPathRegisterNs(ctxt->context, prefix, ctxt->cur) < 0)
xmlXPathPErrMemory(ctxt);
ctxt->base = oldBase;
ctxt->cur = oldCur;
xmlFree(prefix);