From dda78f0b624c1d26e61883dc4132df803abe76fb Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 23 Feb 2021 17:15:08 +0100 Subject: [PATCH] util: iohelper: Don't handle OOM from posix_memalign Similarly to other allocation calls abort() on failure. Signed-off-by: Peter Krempa Reviewed-by: Laine Stump --- 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 #include +#include #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);