mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: virprocess: abort() on CPU_ALLOC failure
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
5f5b676086
commit
06fc9f8e32
@ -462,10 +462,8 @@ int virProcessSetAffinity(pid_t pid, virBitmapPtr map, bool quiet)
|
||||
masklen = CPU_ALLOC_SIZE(numcpus);
|
||||
mask = CPU_ALLOC(numcpus);
|
||||
|
||||
if (!mask) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
if (!mask)
|
||||
abort();
|
||||
|
||||
CPU_ZERO_S(masklen, mask);
|
||||
for (i = 0; i < virBitmapSize(map); i++) {
|
||||
@ -509,10 +507,8 @@ virProcessGetAffinity(pid_t pid)
|
||||
masklen = CPU_ALLOC_SIZE(ncpus);
|
||||
mask = CPU_ALLOC(ncpus);
|
||||
|
||||
if (!mask) {
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
if (!mask)
|
||||
abort();
|
||||
|
||||
CPU_ZERO_S(masklen, mask);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user