[PATCH 26/33] hyperv: abort() failure of wsmc_fault_new()

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

 



The function just allocates a helper object. Reporting errors would be
pointless when we encounter OOM situation.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/hyperv/hyperv_wmi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index 8bb6f591f1..2a898cdf03 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -92,12 +92,8 @@ hypervVerifyResponse(WsManClient *client, WsXmlDocH response,
     }

     if (wsmc_check_for_fault(response)) {
-        fault = wsmc_fault_new();
-
-        if (fault == NULL) {
-            virReportOOMError();
-            return -1;
-        }
+        if (!(fault = wsmc_fault_new()))
+            abort();

         wsmc_get_fault_data(response, fault);

-- 
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