mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
util: iohelper: Don't handle OOM from posix_memalign
Similarly to other allocation calls abort() on failure. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
cc622f5548
commit
dda78f0b62
@ -27,6 +27,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "virthread.h"
|
||||
#include "virfile.h"
|
||||
@ -57,10 +58,8 @@ runIO(const char *path, int fd, int oflags)
|
||||
off_t end = 0;
|
||||
|
||||
#if WITH_POSIX_MEMALIGN
|
||||
if (posix_memalign(&base, alignMask + 1, buflen)) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
if (posix_memalign(&base, alignMask + 1, buflen))
|
||||
abort();
|
||||
buf = base;
|
||||
#else
|
||||
buf = g_new0(char, buflen + alignMask);
|
||||
|
Loading…
x
Reference in New Issue
Block a user