]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
hyperv: abort() failure of wsmc_fault_new()
authorPeter Krempa <pkrempa@redhat.com>
Wed, 24 Feb 2021 09:32:38 +0000 (10:32 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Mar 2021 08:50:19 +0000 (09:50 +0100)
The function just allocates a helper object. Reporting errors would be
pointless when we encounter OOM situation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/hyperv/hyperv_wmi.c

index 8bb6f591f18f78bf8548a79b1fe97bba12ee04e7..2a898cdf034e5da1ef46194cb02878b51e2bba27 100644 (file)
@@ -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);