From nobody Mon Feb 9 00:56:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1643640853; cv=none; d=zohomail.com; s=zohoarc; b=bT9c5CFAMt6OMmoRvFHCQNi8pVZboZyvhCCnW7vQ9FPAWgoyWx3qm8qlKJNOVOyx0Ov6EmAadKCt7Vj91y46PZhPuDw3epMnJJtECpfgo4pQc6wAx5OnwWgQuRFmJz5MdGgGxW6VuN1kGxMjwMcJPuMZM1KTfRwyxnJszzovDPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643640853; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rD02HXYHXrqM266kD+yBOFzA4UpTUCuDB2qYLOuotbQ=; b=UISgb5iPhvABTnz3aeh9eZeCUh/ZZkhz21UWmOvSxhxQCFRks1JbRxAW2+1U9NYgOPERKuxRDivdT/2rFI46CO58rElqZVA6GJTlThBkOxQTT/XeYMJzJ7kqUTuZyp233FjBHVc467i6qhlgvorD6mxg/PpzX8HgoVE9R8xQ6h8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1643640853457330.42761853617753; Mon, 31 Jan 2022 06:54:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-L0vm1xxMP6Ga1z9DmqPa7Q-1; Mon, 31 Jan 2022 09:54:09 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDF3284B9A5; Mon, 31 Jan 2022 14:54:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A72FF10694D9; Mon, 31 Jan 2022 14:54:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 615C34BB7C; Mon, 31 Jan 2022 14:54:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20VErtwT004660 for ; Mon, 31 Jan 2022 09:53:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id DD24884A1A; Mon, 31 Jan 2022 14:53:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5EA5F84A3E for ; Mon, 31 Jan 2022 14:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643640852; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rD02HXYHXrqM266kD+yBOFzA4UpTUCuDB2qYLOuotbQ=; b=jEsaDXqk0ris2yauVLV8jgz/Aotm5NI/OFUAfvRKE7EWtRHLQf1oxdht/ZBDYCaq/BRi+g Bc6wh6fyQ9U2W0mya9CXM+x/YA9Mp3A7efGG1G+G5449piX6dUv+k6Apw0Je4WWhKMav2d NbJovzl9YnkhMS9Hb/yAXY8bC0iSBiA= X-MC-Unique: L0vm1xxMP6Ga1z9DmqPa7Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/4] test_driver: Don't leak @group_name Date: Mon, 31 Jan 2022 15:53:39 +0100 Message-Id: <24f31f7b178c00470f802fb2553c3d83859df0f1.1643640752.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1643640856000100001 Content-Type: text/plain; charset="utf-8" In testDomainSetBlockIoTune() the info.group_name is strdup()-ed and just after the whole @info structure is passed to virDomainDiskSetBlockIOTune() the @group_name member is set to NULL. This creates a memleak, because virDomainDiskSetBlockIOTune() creates its own copy of the string. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- src/test/test_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1504334c30..9e1fc65972 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4027,7 +4027,6 @@ testDomainSetBlockIoTune(virDomainPtr dom, #undef TEST_BLOCK_IOTUNE_MAX_CHECK =20 virDomainDiskSetBlockIOTune(conf_disk, &info); - info.group_name =3D NULL; =20 ret =3D 0; cleanup: --=20 2.34.1