From: Peter Krempa Date: Wed, 24 Feb 2021 09:32:38 +0000 (+0100) Subject: hyperv: abort() failure of wsmc_fault_new() X-Git-Tag: v7.2.0-rc1~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=695d469238729030e6a3e9b33a853ecefbdde47c;p=thirdparty%2Flibvirt.git hyperv: abort() failure of wsmc_fault_new() The function just allocates a helper object. Reporting errors would be pointless when we encounter OOM situation. Signed-off-by: Peter Krempa Reviewed-by: Laine Stump --- 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);