1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

virXMLParseHelper: 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:41 +01:00
parent 45edcd9f89
commit 5f5b676086

View File

@ -789,10 +789,8 @@ virXMLParseHelper(int domcode,
/* Set up a parser context so we can catch the details of XML errors. */
pctxt = xmlNewParserCtxt();
if (!pctxt || !pctxt->sax) {
virReportOOMError();
goto error;
}
if (!pctxt || !pctxt->sax)
abort();
private.domcode = domcode;
pctxt->_private = &private;