From nobody Sun Feb 8 21:47:56 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=1770233417; cv=none; d=zohomail.com; s=zohoarc; b=Qe06tDxm3M4KMRodolVO8A5qc5XO+TLwIZUpmamyehCuzbjBIj2C5HBhgyvFWhjIWmlarLNKeGcHFhsqdP9d4CvfJLixn8AQf6mrJzuYCXxGniAavqAIcMApFdqJM8IYfEsqhafufR2W1wPMhT1xUDGD+OzQIVaLuTfyEOy+MrY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770233417; 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=0GF6b88654wF7Tz/czUbg5UhCA9maBKfd+ju02tjYpk=; b=k/NxVwg8quaTg8oKZBzx3rNAS0yViFLWGtnj5RtEajIeLTT6s3YBOqwAOau3AVP4C558bEZoceEi9NIw6XpJ1mcFl4YZt0ayKSvK1ULCSHTlPfA7pAggT3WPrjcF81BhshdVP0vDItkfVGbAUjoNsJGnyWjgg7jOchsLccWUPH4= 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 1770233416834264.4156240026822; Wed, 4 Feb 2026 11:30:16 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id CCBA741A2B; Wed, 4 Feb 2026 14:30:15 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id D52A041B14; Wed, 4 Feb 2026 14:29:35 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9A90641983; Wed, 4 Feb 2026 14:29:32 -0500 (EST) Received: from forward103d.mail.yandex.net (forward103d.mail.yandex.net [178.154.239.214]) (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 8B1C8418E6 for ; Wed, 4 Feb 2026 14:29:30 -0500 (EST) Received: from mail-nwsmtp-smtp-production-main-81.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:3d48:0:640:52d7:0]) by forward103d.mail.yandex.net (Yandex) with ESMTPS id 75345C0057; Wed, 04 Feb 2026 22:29:26 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id ITvFsNRGm8c0-VCA4AV4m; Wed, 04 Feb 2026 22:29:26 +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=1770233366; bh=0GF6b88654wF7Tz/czUbg5UhCA9maBKfd+ju02tjYpk=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=BQ3gD3iIye5a3XrxJSky0uHeOGnhOnCHP5keK7P/EmYO2/Sb062knIPA/i7OoL3+R NB+qinm2II6NZ6MciVbqo0+QcsW9GHifMMA23oaQy/eMzC6hdRzmienn+XAjy/haxo ddQwsGfMKyWiR92GNytgdXT3ZRQpF5KDRwLHCmHs= Authentication-Results: mail-nwsmtp-smtp-production-main-81.klg.yp-c.yandex.net; dkim=pass header.i=@flant.com From: Dmitry Lopatin To: Tomko Subject: [PATCH v3] virt-aa-helper: Fix unchecked return value Date: Wed, 4 Feb 2026 22:29:16 +0300 Message-Id: <20260204192916.350664-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: U5GXCQOI5RVCXEFAZA6TTI5EHBWZERW7 X-Message-ID-Hash: U5GXCQOI5RVCXEFAZA6TTI5EHBWZERW7 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: 1770233421062154100 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. --- 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..2de1b31b5a 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;("storage", "storageRegister", false); #endif =20 for (i =3D 0; i < ctl->def->ndisks; i++) { --=20 2.34.1