1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

libxl: abort() on failure of libxl_cpu_bitmap_alloc()

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>
This commit is contained in:
Peter Krempa 2021-02-24 11:32:10 +01:00
parent 3fdf0013e5
commit c0e65398d9
2 changed files with 5 additions and 8 deletions

View 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);

View 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,