]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: abort() on failure of libxl_cpu_bitmap_alloc()
authorPeter Krempa <pkrempa@redhat.com>
Wed, 24 Feb 2021 10:32:10 +0000 (11:32 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Mar 2021 08:50:20 +0000 (09:50 +0100)
Attempting to report error in case when we ran out of memory is
pointless.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/libxl/libxl_conf.c
src/libxl/libxl_driver.c

index f8db1189966bceeb4a5d88483aa10e10165ec51b..f2bcd77a29d62808c6e98e24b5e432214405d11a 100644 (file)
@@ -854,10 +854,8 @@ libxlMakeVnumaList(virDomainDefPtr def,
             goto cleanup;
 
         libxl_bitmap_init(&vcpu_bitmap);
-        if (libxl_cpu_bitmap_alloc(ctx, &vcpu_bitmap, b_info->max_vcpus)) {
-            virReportOOMError();
-            goto cleanup;
-        }
+        if (libxl_cpu_bitmap_alloc(ctx, &vcpu_bitmap, b_info->max_vcpus))
+            abort();
 
         do {
             libxl_bitmap_set(&vcpu_bitmap, cpu);
index 75a8d46af0c631d4448f3d4aa585c726effdf2dd..434959d69411443e502a6d60800e67c76fd8102c 100644 (file)
@@ -4931,10 +4931,9 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
             if (numnodes <= 0)
                 goto cleanup;
 
-            if (libxl_node_bitmap_alloc(cfg->ctx, &nodemap, 0)) {
-                virReportOOMError();
-                goto cleanup;
-            }
+            if (libxl_node_bitmap_alloc(cfg->ctx, &nodemap, 0))
+                abort();
+
             nodes = virBitmapNew(numnodes);
 
             rc = libxl_domain_get_nodeaffinity(cfg->ctx,