From nobody Sat Feb 7 07:25:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=flant.com ARC-Seal: i=1; a=rsa-sha256; t=1770372243; cv=none; d=zohomail.com; s=zohoarc; b=fD/HP4LV2SC1h9oSheeNcvuk61fx6WlyM5VGgHCnPECEQj8yhgrUzJsCVJQ/J8Vrw4VSpZTJ9XSOR2L1xPUopY8HLgFsjRjXe+6tvp8FSzU2iv4NW0+gqYeLl3RvEL2LIiHAFgbrvh2tOYuHL86S7Xl03FJvtp4lULfLEJ8ea1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770372243; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=qQ/l3gZIKOq/6EfeQEYfldFRrNXR4kBt3JLvolhx8CY=; b=jeTrs3KDMgkd2BB/TRGMr5FYk40FTx42hE2eHlHAq6wLyQ4qmelEodkhFWSfMZc9shdYcpSPT3qJsESKf+TeonzqFxPnFGOXTD5h9IPf7stjlaUUJpw3I8iIRhJhQbS9QTQmY2PToT+ICzlEXWCDQi/gxSGIXK1Iq/3WMaeeLTM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 177037224286117.820186991658034; Fri, 6 Feb 2026 02:04:02 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 347953FCAD; Fri, 6 Feb 2026 05:04:02 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 747E241A38; Fri, 6 Feb 2026 05:03:23 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id DEA3E3FB95; Fri, 6 Feb 2026 05:03:18 -0500 (EST) Received: from forward102b.mail.yandex.net (forward102b.mail.yandex.net [178.154.239.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7F6013FAD0 for ; Fri, 6 Feb 2026 05:03:17 -0500 (EST) Received: from mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net [IPv6:2a02:6b8:c1c:405:0:640:8814:0]) by forward102b.mail.yandex.net (Yandex) with ESMTPS id B3122C0112; Fri, 06 Feb 2026 13:03:14 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 63LDSS1GGKo0-Nck91N8q; Fri, 06 Feb 2026 13:03:14 +0300 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flant.com; s=mail; t=1770372194; bh=qQ/l3gZIKOq/6EfeQEYfldFRrNXR4kBt3JLvolhx8CY=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=fTwypTT6DXo0ndQ6uh6hSynugogyheoMPmX6zCH/b2M8M0xCevxRLhAq9qjN59gBo bEV8tC8xWKIMtFund34enU85UxglYsY+SH2mEsrpVSFepCMiNG4P4n37K2uz9UfRZq qIO3U6E9qMBnIj2NswAf8sP640bsoAU7kFOCgYiI= Authentication-Results: mail-nwsmtp-smtp-production-main-87.sas.yp-c.yandex.net; dkim=pass header.i=@flant.com From: Dmitry Lopatin To: Peter Krempa Subject: [PATCH v4] virt-aa-helper: Fix unchecked return value Date: Fri, 6 Feb 2026 13:03:04 +0300 Message-Id: <20260206100304.132263-1-dmitry.lopatin@flant.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6NNJEJAXS3N5BVREYKCBR4XMDSDWBUKU X-Message-ID-Hash: 6NNJEJAXS3N5BVREYKCBR4XMDSDWBUKU X-MailFrom: dmitry.lopatin@flant.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: devel@lists.libvirt.org, Dmitry Lopatin X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @flant.com) X-ZM-MESSAGEID: 1770372245773154100 Content-Type: text/plain; charset="utf-8" Add missing return value checks to fix the following issues reported by the static analyzer: - virDriverLoadModule() call when loading the storage driver (line 908) was not checked, while there are examples with return code check throughout the code. Signed-off-by: Dmitry Lopatin --- src/security/virt-aa-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index f4ec6b7826..624da61a0f 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -892,7 +892,8 @@ get_files(vahControl * ctl) =20 /* load the storage driver so that backing store can be accessed */ #ifdef WITH_STORAGE - virDriverLoadModule("storage", "storageRegister", false); + if (virDriverLoadModule("storage", "storageRegister", false) < 0) + goto cleanup; #endif =20 for (i =3D 0; i < ctl->def->ndisks; i++) { --=20 2.34.1