[PATCH 25/33] util: iohelper: Don't handle OOM from posix_memalign

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similarly to other allocation calls abort() on failure.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux