From nobody Sun Feb 8 18:18:52 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=fail; 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=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1770133617; cv=none; d=zohomail.com; s=zohoarc; b=iATiL0wsOheWlekTaZ1OKo1qViz8H1cDw/vfDBi4EqnHZDodzM/esXqyQs+chZHLts9lOzvD4/QlliX5Pyw5N8RGXOPURZEfD7Nk1ujRhoy8M6XKsaPubhfAek1LtWFeXl10lKlxOIL+gdmhBNKuW5jYNvXQJgtIh8NOXRv29w8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770133617; h=Content-Type:Content-Transfer-Encoding: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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=0oOgbJ/sAvKw1IbRpCgXSH5BPpGN1jfsdhhPpMvpsxo=; b=ZiS+KpfFzddBDPflmrzBjWvS4FVHtdot3YHOLxbKit0yK/JSemLT0Af8StZWsWnjFn28gsIHXMw/Y/DWtRuxVLyZSfFKddwkixsZDgs+LMDc1IK+l8hVtCtZwcVdRnudLc+iIxarwNpOFJtgK6MA8LvPwOwB5QJnF6lfY93h0jo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1770133617401248.05755373274712; Tue, 3 Feb 2026 07:46:57 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id B4E5641ACB; Tue, 3 Feb 2026 10:46:56 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 884E543F0B; Tue, 3 Feb 2026 10:42:31 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 571A441A31; Tue, 3 Feb 2026 10:42:27 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 2964B41989 for ; Tue, 3 Feb 2026 10:40:12 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-LekWC4s5PFyFHcAywUME6A-1; Tue, 03 Feb 2026 10:40:10 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4483B195609E for ; Tue, 3 Feb 2026 15:40:09 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A15951956053 for ; Tue, 3 Feb 2026 15:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770133211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0oOgbJ/sAvKw1IbRpCgXSH5BPpGN1jfsdhhPpMvpsxo=; b=jLgnDPue9NuC23hEsnGZDBEk+PfPJ9zydvlbP/d1PdTOKe9iqQWb8E5/xIU92JoyEnAZUX PT0umPgG/WbMTYpfSAh9i74uFo2ZQ+F4S1Id3/yqm6uk4Nrt+5vyIcfQ1HZli7Ttj7oVXs Wlcq//1t5Egi4ez9V1KczWexAVO0+ug= X-MC-Unique: LekWC4s5PFyFHcAywUME6A-1 X-Mimecast-MFC-AGG-ID: LekWC4s5PFyFHcAywUME6A_1770133209 To: devel@lists.libvirt.org Subject: [PATCH 8/9] bhyvexml2argvtest: Avoid leaking firmwareDir Date: Tue, 3 Feb 2026 16:39:56 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: u0qoFT8KW2qNLlZf_AsiqZCl98P4qtrPFtPiQ4NP6fk_1770133209 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SVMGFNV2KNYHTUYL223CMNNKVGGVB2ZE X-Message-ID-Hash: SVMGFNV2KNYHTUYL223CMNNKVGGVB2ZE X-MailFrom: mprivozn@redhat.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 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: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1770133620823154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The firmwareDir member of driver config is set at the beginning of mymain(). But then, roughly in the middle of test cases it is overwritten to fakefirmwareemptydir. But this means the old value must be freed. Or reassigned back to its original variable which is freed automatically. 16 bytes in 1 blocks are definitely lost in loss record 190 of 505 at 0x4883224: malloc (vg_replace_malloc.c:451) by 0x4EE6562: g_malloc (in /usr/local/lib/libglib-2.0.so.0.8400.4) by 0x4F0100F: g_strdup (in /usr/local/lib/libglib-2.0.so.0.8400.4) by 0x4013E26: g_strdup_inline (gstrfuncs.h:321) by 0x4013E26: mymain (bhyvexml2argvtest.c:151) by 0x40189A2: virTestMain (testutils.c:913) by 0x4013DE6: main (bhyvexml2argvtest.c:354) Signed-off-by: Michal Privoznik --- tests/bhyvexml2argvtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 8f078f9d78..ae43445cde 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -249,7 +249,8 @@ mymain(void) DO_TEST("isa-controller"); DO_TEST_FAILURE("isa-multiple-controllers"); DO_TEST("firmware-efi"); - driver.config->firmwareDir =3D fakefirmwareemptydir; + fakefirmwaredir =3D g_steal_pointer(&driver.config->firmwareDir); + driver.config->firmwareDir =3D g_steal_pointer(&fakefirmwareemptydir); DO_TEST_PREPARE_ERROR("firmware-efi"); DO_TEST("fs-9p"); DO_TEST("fs-9p-readonly"); --=20 2.52.0