From nobody Sun Feb 8 21:53:33 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=1761738413; cv=none; d=zohomail.com; s=zohoarc; b=ajwxqhydFvZTqhRRTBzUYyL+UnjJVt15yGHVT3ASbssnzJXu1AGZM8jyOCRagoR8qRnmWfkte5xE6/QDeyVbM9rp0tQU7Kjjd8KR83isssHiSGeWhQIP+7kxNz+U5NNpPRPqFB06L4aA9UOH8ssbb5uNjpr6M8/IBQRM3PikVBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761738413; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=apAg7TZKQJ+qnIQnvGzsZnT9wl/m0WIgACrAa3SbebQ=; b=QRCyFc++6xYd0howODaW6aJWabheAO2t+Ak7KKKoTlglDqfSsTMwnuVb5p0tqjgW98ChJhy2RFp/7Qbd2KveXt9DI9coSBngbZtsBXVKJ/dCXkM+F7xc1WYK2ER4pr0Mz+XyHOlDBnuPwGJZJilHfSqSDXOSo5kGXUxVP7lcFVE= 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 1761738413788404.8553603592019; Wed, 29 Oct 2025 04:46:53 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id CEFF4419D4; Wed, 29 Oct 2025 07:46:52 -0400 (EDT) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 624C941B45; Wed, 29 Oct 2025 07:46:09 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 9CA47419A2; Wed, 29 Oct 2025 07:45:33 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 BC986418BF for ; Wed, 29 Oct 2025 07:45:31 -0400 (EDT) Received: from mx-prod-mc-02.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-640-Hzzh0RbiM1CC8PTYeIuotg-1; Wed, 29 Oct 2025 07:45:30 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7ADD9195608A for ; Wed, 29 Oct 2025 11:45:29 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BC3D918004D8 for ; Wed, 29 Oct 2025 11:45:28 +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=1761738331; 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; bh=apAg7TZKQJ+qnIQnvGzsZnT9wl/m0WIgACrAa3SbebQ=; b=STNAOhTuythh5HKh/P+ZwCiQJSW0SNv/6Ls25XOaWn+beddFPUVs8/zT5nWr7Z7GeSZYI1 3yagMqs9B9HJlwLM8UoIq6yMWpoUjpI2e6Imp/ALuulsaB79MY5p1QQY71ADIe/IiuqA48 Svf/2l0Eg8zLob9rdbL8b1k4YTPO10Q= X-MC-Unique: Hzzh0RbiM1CC8PTYeIuotg-1 X-Mimecast-MFC-AGG-ID: Hzzh0RbiM1CC8PTYeIuotg_1761738329 To: devel@lists.libvirt.org Subject: [PATCH] domain_conf: Avoid memory leak in virDomainMemoryDefFree() Date: Wed, 29 Oct 2025 12:45:26 +0100 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: G-JCzf_Ape2ViJVmZS4D0vNznSfIpqVsLzJ-kD9a5fs_1761738329 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HXDXTROYYUFKDFYJUIBGRILHTOUQLMBJ X-Message-ID-Hash: HXDXTROYYUFKDFYJUIBGRILHTOUQLMBJ 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: 1761738414725158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik In my one of my recent commits I've introduced new member to virDomainMemoryDef struct. While allocated in virDomainMemoryDefParseXML() its counterpart for freeing is missing in virDomainMemoryDefFree(). Add it. Signed-off-by: Michal Privoznik --- Pushed as trivial. src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c09f026a1c..1e84c93841 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3614,6 +3614,7 @@ void virDomainMemoryDefFree(virDomainMemoryDef *def) } =20 virDomainDeviceInfoClear(&def->info); + g_free(def->virtio); g_free(def); } =20 --=20 2.51.0