Similarly to other allocation calls abort() on failure.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/iohelper.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/util/iohelper.c b/src/util/iohelper.c
index 49d939d290..b8810d16d3 100644
--- a/src/util/iohelper.c
+++ b/src/util/iohelper.c
@@ -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);
--
2.29.2