From nobody Tue Feb 10 12:45:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1612411113; cv=none; d=zohomail.com; s=zohoarc; b=mKHwizuZkKoInXYVJbV9Q2HIg9r1MQiNZR1CMX1+yOnzLSVR4sdtws6wKUr6ksTRs4m2QJ8cUQFKCBAPT2ZYPm75FzbXok8HvGSXdjdKHiKQFqLCkRGvwb3ASb3zc6Hsq91lmoJ02G3P5c27cjZVyOvODnROhjkCwMCiaZ6P8GQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411113; 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=Q9CxsfxywgFmNJpeeVyME0jumwmAWDWWhneGUvvIbVI=; b=LmOQ9JCiKZICRzvP6zqbdlLmQOHLaeYXUyKdhvhfaEm77u7TDVgUHKmkPhrdpiuucFQJ7wqg9Jw2ExkTCZgqaL2jXh/pNEG8uWPcUBCorosGSmYVY7XKj/cr2D/AR55rzbGYXt4P9stqwDdl0JEdI1OP3LpUbOU8r52Xt1yNwVg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612411113811171.17916024051692; Wed, 3 Feb 2021 19:58:33 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-303-5G0NfvCLPMO4q1EFXvYtig-1; Wed, 03 Feb 2021 22:58:30 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E3AE183CD05; Thu, 4 Feb 2021 03:58:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F53F5D9EF; Thu, 4 Feb 2021 03:58:24 +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 F33D418089CC; Thu, 4 Feb 2021 03:58:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143w6v5003458 for ; Wed, 3 Feb 2021 22:58:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id EDA975B697; Thu, 4 Feb 2021 03:58:06 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-199.phx2.redhat.com [10.3.112.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id B85515B695 for ; Thu, 4 Feb 2021 03:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411112; 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=Q9CxsfxywgFmNJpeeVyME0jumwmAWDWWhneGUvvIbVI=; b=ay0hwJtgjhvWFS9kHnHEF+gd5QX82nxxW0YIfBUeQqSDtpz9LT7XZ6cez+FWOb6dzPjh1H DKpBzX/p7aRk8qpntjWCuQGH0TNvYVFNRp30JrwMy39RBtlQZP5k9FpjzFT5TUvwJeS52d UVH5eTHhVCjz7BxrPgbw+xyOHaSjAT4= X-MC-Unique: 5G0NfvCLPMO4q1EFXvYtig-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 17/24] tests: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:44 -0500 Message-Id: <20210204035751.164765-18-laine@redhat.com> In-Reply-To: <20210204035751.164765-1-laine@redhat.com> References: <20210204035751.164765-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.79 on 10.5.11.14 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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- tests/nodedevmdevctltest.c | 4 ++-- tests/nwfilterxml2firewalltest.c | 2 +- tests/qemuhotplugtest.c | 12 ++++++------ tests/qemumonitortestutils.c | 28 ++++++++++++++-------------- tests/virnetdaemontest.c | 2 +- tests/virnetserverclienttest.c | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index dab4b487b9..1bad65549b 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -152,8 +152,8 @@ nodedevTestDriverFree(virNodeDeviceDriverStatePtr drv) virNodeDeviceObjListFree(drv->devs); virCondDestroy(&drv->initCond); virMutexDestroy(&drv->lock); - VIR_FREE(drv->stateDir); - VIR_FREE(drv); + g_free(drv->stateDir); + g_free(drv); } =20 /* Add a fake root 'computer' device */ diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewallt= est.c index 0901250aaf..3e2ab0b0ba 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -174,7 +174,7 @@ virNWFilterRuleInstFree(virNWFilterRuleInstPtr inst) return; =20 virHashFree(inst->vars); - VIR_FREE(inst); + g_free(inst); } =20 =20 diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 776fb019f3..df5c9c9059 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -383,12 +383,12 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuD= ata *data) if (!data) return; =20 - VIR_FREE(data->file_xml_dom); - VIR_FREE(data->file_xml_res_live); - VIR_FREE(data->file_xml_res_conf); - VIR_FREE(data->file_json_monitor); + g_free(data->file_xml_dom); + g_free(data->file_xml_res_live); + g_free(data->file_xml_res_conf); + g_free(data->file_json_monitor); =20 - VIR_FREE(data->xml_dom); + g_free(data->xml_dom); =20 if (data->vm) { priv =3D data->vm->privateData; @@ -402,7 +402,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuDat= a *data) virObjectLock(mon); qemuMonitorTestFree(data->mon); } - VIR_FREE(data); + g_free(data); } =20 =20 diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index c4f7082655..ae3fcf9311 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -99,7 +99,7 @@ qemuMonitorTestItemFree(qemuMonitorTestItemPtr item) if (item->freecb) (item->freecb)(item->opaque); =20 - VIR_FREE(item); + g_free(item); } =20 =20 @@ -423,8 +423,8 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) if (timer !=3D -1) virEventRemoveTimeout(timer); =20 - VIR_FREE(test->incoming); - VIR_FREE(test->outgoing); + g_free(test->incoming); + g_free(test->outgoing); =20 for (i =3D 0; i < test->nitems; i++) { if (!test->allowUnusedCommands) { @@ -435,12 +435,12 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) =20 qemuMonitorTestItemFree(test->items[i]); } - VIR_FREE(test->items); + g_free(test->items); =20 if (test->tmpdir && rmdir(test->tmpdir) < 0) VIR_WARN("Failed to remove tempdir: %s", g_strerror(errno)); =20 - VIR_FREE(test->tmpdir); + g_free(test->tmpdir); =20 if (!test->allowUnusedCommands && test->nitems !=3D 0) { @@ -448,7 +448,7 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) } =20 virMutexDestroy(&test->lock); - VIR_FREE(test); + g_free(test); } =20 =20 @@ -518,16 +518,16 @@ qemuMonitorTestHandlerDataFree(void *opaque) return; =20 for (i =3D 0; i < data->nargs; i++) { - VIR_FREE(data->args[i].argname); - VIR_FREE(data->args[i].argval); + g_free(data->args[i].argname); + g_free(data->args[i].argval); } =20 - VIR_FREE(data->command_name); - VIR_FREE(data->cmderr); - VIR_FREE(data->response); - VIR_FREE(data->args); - VIR_FREE(data->expectArgs); - VIR_FREE(data); + g_free(data->command_name); + g_free(data->cmderr); + g_free(data->response); + g_free(data->args); + g_free(data->expectArgs); + g_free(data); } =20 =20 diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index a20f351f93..fb40fe9b80 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -76,7 +76,7 @@ testClientNewPostExec(virNetServerClientPtr client, static void testClientFree(void *opaque) { - VIR_FREE(opaque); + g_free(opaque); } =20 =20 diff --git a/tests/virnetserverclienttest.c b/tests/virnetserverclienttest.c index a4341c1641..959100ec66 100644 --- a/tests/virnetserverclienttest.c +++ b/tests/virnetserverclienttest.c @@ -41,7 +41,7 @@ testClientNew(virNetServerClientPtr client G_GNUC_UNUSED, static void testClientFree(void *opaque) { - VIR_FREE(opaque); + g_free(opaque); } =20 static int testIdentity(const void *opaque G_GNUC_UNUSED) --=20 2.29.2