virXMLXPathContextNew: abort() on allocation failure

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Peter Krempa 2021-02-24 09:53:05 +01:00
parent c3a5c67a84
commit 45edcd9f89

View File

@ -51,10 +51,8 @@ virXMLXPathContextNew(xmlDocPtr xml)
{
xmlXPathContextPtr ctxt;
if (!(ctxt = xmlXPathNewContext(xml))) {
virReportOOMError();
return NULL;
}
if (!(ctxt = xmlXPathNewContext(xml)))
abort();
return ctxt;
}