[PATCH 21/33] virXMLXPathContextNew: abort() on allocation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virxml.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/util/virxml.c b/src/util/virxml.c
index ebe479f5d3..62bbafacd6 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -51,10 +51,8 @@ virXMLXPathContextNew(xmlDocPtr xml)
 {
     xmlXPathContextPtr ctxt;

-    if (!(ctxt = xmlXPathNewContext(xml))) {
-        virReportOOMError();
-        return NULL;
-    }
+    if (!(ctxt = xmlXPathNewContext(xml)))
+        abort();

     return ctxt;
 }
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux