From nobody Fri May 3 03:02:31 2024 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=1612411090; cv=none; d=zohomail.com; s=zohoarc; b=lDyFhkiwe/mCRhsp3O/vI+rxNo2iYEJHCKdem1t0JMhWcV6kRUdkwEBnqEpbSvXoeShmUhRuitaqfYW77RgHx3G8nEZNtLjHUM361EP9NBFYFnU93O2xe7cURUQfOVTCPxNPuSkHOV4W76DdS3GuJAkOK8yU1X/KDp8nq1LUagI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411090; 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=OViBLKcuWlzCZbaFhWiqgngtGyGLF7aDyxV25DSt5+Y=; b=ZMjUCyROXTZ+2WAdrkFskdER/pBl3ThbmmVgh0tOXt/PLpriSt4U+xWu904b00cXw0ixq7q5B5J5mg3XWWwauh5fmr6FmAgUgyEUCB8FPFwcdDmE4558OpkaXQ4979tOAMmuYqYANSKS5mh6cF3QpIfo5AXVc+2JEvINV1kEH0A= 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 1612411090522560.2865791194389; Wed, 3 Feb 2021 19:58:10 -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-31-edIrVgixMaOs7ztyalKsRQ-1; Wed, 03 Feb 2021 22:58:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4FA58107ACE4; Thu, 4 Feb 2021 03:58:01 +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 21685722D1; Thu, 4 Feb 2021 03:58:00 +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 9B53B4EE4D; Thu, 4 Feb 2021 03:57:58 +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 1143vvZ4003312 for ; Wed, 3 Feb 2021 22:57:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id 68D7F5B697; Thu, 4 Feb 2021 03:57:57 +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 33B765B695 for ; Thu, 4 Feb 2021 03:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411089; 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=OViBLKcuWlzCZbaFhWiqgngtGyGLF7aDyxV25DSt5+Y=; b=ZHjMxfMcg09UW5CMUqUGLS+VZFoo41EMcxbDICn6Jzws+s87uWbM7v/fW1OGFFzMhvKbOt jeqbkVp3Wec+DV0eNt1UdcWKCPKaISnhoYoo16eA/L1WYDp4ucpBZ+rFpvXeLbXFRw5MOp 2/Y5HyDcE+ylB+oRQc8qe86tROwJ+NA= X-MC-Unique: edIrVgixMaOs7ztyalKsRQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 01/24] conf: replace remaining straggler VIR_FREE with g_free in vir*Free() Date: Wed, 3 Feb 2021 22:57:28 -0500 Message-Id: <20210204035751.164765-2-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.11 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" I missed a few in commit f9f81f1c Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 6 +++--- src/conf/numa_conf.c | 10 +++++----- src/conf/storage_encryption_conf.c | 2 +- src/conf/virchrdev.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 12ebdb37f4..3f71297283 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26528,7 +26528,7 @@ virDomainRNGDefFree(virDomainRNGDefPtr def) =20 switch ((virDomainRNGBackend) def->backend) { case VIR_DOMAIN_RNG_BACKEND_RANDOM: - VIR_FREE(def->source.file); + g_free(def->source.file); break; case VIR_DOMAIN_RNG_BACKEND_EGD: virObjectUnref(def->source.chardev); @@ -26539,8 +26539,8 @@ virDomainRNGDefFree(virDomainRNGDefPtr def) } =20 virDomainDeviceInfoClear(&def->info); - VIR_FREE(def->virtio); - VIR_FREE(def); + g_free(def->virtio); + g_free(def); } =20 =20 diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index f8a7a01ac9..338d779e90 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -416,15 +416,15 @@ virDomainNumaFree(virDomainNumaPtr numa) virBitmapFree(numa->mem_nodes[i].nodeset); =20 if (numa->mem_nodes[i].ndistances > 0) - VIR_FREE(numa->mem_nodes[i].distances); + g_free(numa->mem_nodes[i].distances); =20 - VIR_FREE(numa->mem_nodes[i].caches); + g_free(numa->mem_nodes[i].caches); } - VIR_FREE(numa->mem_nodes); + g_free(numa->mem_nodes); =20 - VIR_FREE(numa->interconnects); + g_free(numa->interconnects); =20 - VIR_FREE(numa); + g_free(numa); } =20 /** diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encrypti= on_conf.c index 7fd0df70a9..e2ae7f7b51 100644 --- a/src/conf/storage_encryption_conf.c +++ b/src/conf/storage_encryption_conf.c @@ -64,7 +64,7 @@ virStorageEncryptionSecretFree(virStorageEncryptionSecret= Ptr secret) if (!secret) return; virSecretLookupDefClear(&secret->seclookupdef); - VIR_FREE(secret); + g_free(secret); } =20 void diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index d356a1babf..e5257650d4 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -223,8 +223,8 @@ static void virChrdevFDStreamCloseCbFree(void *opaque) { virChrdevStreamInfoPtr priv =3D opaque; =20 - VIR_FREE(priv->path); - VIR_FREE(priv); + g_free(priv->path); + g_free(priv); } =20 /** @@ -304,7 +304,7 @@ void virChrdevFree(virChrdevsPtr devs) virMutexUnlock(&devs->lock); virMutexDestroy(&devs->lock); =20 - VIR_FREE(devs); + g_free(devs); } =20 /** --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411098; cv=none; d=zohomail.com; s=zohoarc; b=IV5ku5cBiTRA3/2aWlIUPcjp5GQOdD3bOL2HdHQMaRQCGg/TRwnmu7g6NO29HdUs4Es37ODa7gMX3Hq97jRLKvAJAfai7H3V9AW8LZ479ukdenPyARAmY54u0/lyGqt1PTQEYQzxLsb5YWPBQSEblc9P0Vkw4nEfkLdEkEL/Wbk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411098; 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=4fxDXGCWV7Nly1NsfmEhMalkgZxGAbND0lrJ9+smZe4=; b=TKtYtvh7VCMNDsJVQ2Hot48ljIWVq7ZrRIRVz6/qKadjLShMBtLvfPvuNV+wrFdga95H7otipI1b6fDEdffY4RAdspocs+qfA+oS+oBvn9F+1ngtygrzJ8GFOiLpp29oUs92IAZNtHcgS4kHtijqLyPbYyDNjIz51ZvPyq0rxfw= 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 161241109884462.65690889643997; Wed, 3 Feb 2021 19:58:18 -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-575-kZ1RYwP8NlWaZxxOlditCQ-1; Wed, 03 Feb 2021 22:58:15 -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 0C78B183CD01; Thu, 4 Feb 2021 03:58:09 +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 DC644101E66C; Thu, 4 Feb 2021 03:58:08 +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 ABE0257DFA; Thu, 4 Feb 2021 03:58:08 +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 1143w15K003341 for ; Wed, 3 Feb 2021 22:58:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id A0DE55B695; Thu, 4 Feb 2021 03:58:01 +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 48CB65B697 for ; Thu, 4 Feb 2021 03:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411097; 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=4fxDXGCWV7Nly1NsfmEhMalkgZxGAbND0lrJ9+smZe4=; b=HgVvVIQ5m6lIh76vGebnQUcozpe0db0f15CZIrQAA3D46Kre5Ib3XyVPIgkY0yNtbnojmg GNlzmtIESoEVUDI934irz0H1sbMttxb08Y5zGL8x72By/eE0vkjLnNKoTaOQnx4wpvzjP4 N9bJdypWApYz+at6DYkIbam0j2P1Gwk= X-MC-Unique: kZ1RYwP8NlWaZxxOlditCQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/24] util: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:29 -0500 Message-Id: <20210204035751.164765-3-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.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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/util/virarptable.c | 8 +-- src/util/virauthconfig.c | 4 +- src/util/virbitmap.c | 4 +- src/util/vircgroup.c | 12 ++--- src/util/vircommand.c | 24 ++++----- src/util/virconf.c | 10 ++-- src/util/virdnsmasq.c | 16 +++--- src/util/virebtables.c | 4 +- src/util/virfdstream.c | 10 ++-- src/util/virfile.c | 4 +- src/util/virfirewall.c | 16 +++--- src/util/virfirmware.c | 8 +-- src/util/virjson.c | 12 ++--- src/util/virlockspace.c | 12 ++--- src/util/virlog.c | 12 ++--- src/util/virmacaddr.c | 2 +- src/util/virmdev.c | 16 +++--- src/util/virnetdev.c | 12 ++--- src/util/virnetdevbandwidth.c | 6 +-- src/util/virnetdevip.c | 6 +-- src/util/virnetdevmacvlan.c | 8 +-- src/util/virnetdevvlan.c | 2 +- src/util/virnvme.c | 2 +- src/util/virobject.c | 2 +- src/util/virpci.c | 18 +++---- src/util/virperf.c | 2 +- src/util/virportallocator.c | 4 +- src/util/virresctrl.c | 6 +-- src/util/virrotatingfile.c | 14 ++--- src/util/virscsi.c | 16 +++--- src/util/virscsivhost.c | 10 ++-- src/util/virseclabel.c | 16 +++--- src/util/virsocketaddr.c | 2 +- src/util/virsysinfo.c | 96 ++++++++++++++++----------------- src/util/virsystemd.c | 6 +-- src/util/virthreadpool.c | 6 +-- src/util/virtypedparam-public.c | 2 +- src/util/virtypedparam.c | 8 +-- src/util/viruri.c | 20 +++---- src/util/virusb.c | 8 +-- src/util/virxml.c | 4 +- 41 files changed, 225 insertions(+), 225 deletions(-) diff --git a/src/util/virarptable.c b/src/util/virarptable.c index dac3486470..dfe3ebee5b 100644 --- a/src/util/virarptable.c +++ b/src/util/virarptable.c @@ -172,9 +172,9 @@ virArpTableFree(virArpTablePtr table) return; =20 for (i =3D 0; i < table->n; i++) { - VIR_FREE(table->t[i].ipaddr); - VIR_FREE(table->t[i].mac); + g_free(table->t[i].ipaddr); + g_free(table->t[i].mac); } - VIR_FREE(table->t); - VIR_FREE(table); + g_free(table->t); + g_free(table); } diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 6b5487c4b0..0fc1b5c589 100644 --- a/src/util/virauthconfig.c +++ b/src/util/virauthconfig.c @@ -88,8 +88,8 @@ void virAuthConfigFree(virAuthConfigPtr auth) return; =20 g_key_file_free(auth->keyfile); - VIR_FREE(auth->path); - VIR_FREE(auth); + g_free(auth->path); + g_free(auth); } =20 =20 diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 4fde6f4fd2..b2569b0b03 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -94,8 +94,8 @@ void virBitmapFree(virBitmapPtr bitmap) { if (bitmap) { - VIR_FREE(bitmap->map); - VIR_FREE(bitmap); + g_free(bitmap->map); + g_free(bitmap); } } =20 diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 15071d8b1b..b11bbc5f9e 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3580,15 +3580,15 @@ virCgroupFree(virCgroupPtr group) return; =20 for (i =3D 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) { - VIR_FREE(group->legacy[i].mountPoint); - VIR_FREE(group->legacy[i].linkPoint); - VIR_FREE(group->legacy[i].placement); + g_free(group->legacy[i].mountPoint); + g_free(group->legacy[i].linkPoint); + g_free(group->legacy[i].placement); } =20 - VIR_FREE(group->unified.mountPoint); - VIR_FREE(group->unified.placement); + g_free(group->unified.mountPoint); + g_free(group->unified.placement); =20 - VIR_FREE(group); + g_free(group); } =20 =20 diff --git a/src/util/vircommand.c b/src/util/vircommand.c index b1a26f68aa..87a60be201 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -3028,25 +3028,25 @@ virCommandFree(virCommandPtr cmd) VIR_FORCE_CLOSE(cmd->passfd[i].fd); } cmd->npassfd =3D 0; - VIR_FREE(cmd->passfd); + g_free(cmd->passfd); =20 if (cmd->asyncioThread) { virThreadJoin(cmd->asyncioThread); - VIR_FREE(cmd->asyncioThread); + g_free(cmd->asyncioThread); } - VIR_FREE(cmd->inbuf); + g_free(cmd->inbuf); VIR_FORCE_CLOSE(cmd->outfd); VIR_FORCE_CLOSE(cmd->errfd); =20 for (i =3D 0; i < cmd->nargs; i++) - VIR_FREE(cmd->args[i]); - VIR_FREE(cmd->args); + g_free(cmd->args[i]); + g_free(cmd->args); =20 for (i =3D 0; i < cmd->nenv; i++) - VIR_FREE(cmd->env[i]); - VIR_FREE(cmd->env); + g_free(cmd->env[i]); + g_free(cmd->env); =20 - VIR_FREE(cmd->pwd); + g_free(cmd->pwd); =20 if (cmd->handshake) { /* The other 2 fds in these arrays are closed @@ -3056,21 +3056,21 @@ virCommandFree(virCommandPtr cmd) VIR_FORCE_CLOSE(cmd->handshakeNotify[1]); } =20 - VIR_FREE(cmd->pidfile); + g_free(cmd->pidfile); =20 if (cmd->reap) virCommandAbort(cmd); =20 #if defined(WITH_SECDRIVER_SELINUX) - VIR_FREE(cmd->seLinuxLabel); + g_free(cmd->seLinuxLabel); #endif #if defined(WITH_SECDRIVER_APPARMOR) - VIR_FREE(cmd->appArmorProfile); + g_free(cmd->appArmorProfile); #endif =20 virCommandFreeSendBuffers(cmd); =20 - VIR_FREE(cmd); + g_free(cmd); } =20 /** diff --git a/src/util/virconf.c b/src/util/virconf.c index e983a769ee..d85fc32b64 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -788,15 +788,15 @@ virConfFree(virConfPtr conf) tmp =3D conf->entries; while (tmp) { virConfEntryPtr next; - VIR_FREE(tmp->name); + g_free(tmp->name); virConfFreeValue(tmp->value); - VIR_FREE(tmp->comment); + g_free(tmp->comment); next =3D tmp->next; - VIR_FREE(tmp); + g_free(tmp); tmp =3D next; } - VIR_FREE(conf->filename); - VIR_FREE(conf); + g_free(conf->filename); + g_free(conf); return 0; } =20 diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 63ac088e06..c21819c981 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -75,14 +75,14 @@ addnhostsFree(dnsmasqAddnHostsfile *addnhostsfile) for (i =3D 0; i < addnhostsfile->nhosts; i++) addnhostFree(&addnhostsfile->hosts[i]); =20 - VIR_FREE(addnhostsfile->hosts); + g_free(addnhostsfile->hosts); =20 addnhostsfile->nhosts =3D 0; } =20 - VIR_FREE(addnhostsfile->path); + g_free(addnhostsfile->path); =20 - VIR_FREE(addnhostsfile); + g_free(addnhostsfile); } =20 static int @@ -272,14 +272,14 @@ hostsfileFree(dnsmasqHostsfile *hostsfile) for (i =3D 0; i < hostsfile->nhosts; i++) dhcphostFree(&hostsfile->hosts[i]); =20 - VIR_FREE(hostsfile->hosts); + g_free(hostsfile->hosts); =20 hostsfile->nhosts =3D 0; } =20 - VIR_FREE(hostsfile->path); + g_free(hostsfile->path); =20 - VIR_FREE(hostsfile); + g_free(hostsfile); } =20 /* Note: There are many additional dhcp-host specifications @@ -465,14 +465,14 @@ dnsmasqContextFree(dnsmasqContext *ctx) if (!ctx) return; =20 - VIR_FREE(ctx->config_dir); + g_free(ctx->config_dir); =20 if (ctx->hostsfile) hostsfileFree(ctx->hostsfile); if (ctx->addnhostsfile) addnhostsFree(ctx->addnhostsfile); =20 - VIR_FREE(ctx); + g_free(ctx); } =20 /** diff --git a/src/util/virebtables.c b/src/util/virebtables.c index b23ce21ae9..e296cf2578 100644 --- a/src/util/virebtables.c +++ b/src/util/virebtables.c @@ -73,8 +73,8 @@ ebtablesContextFree(ebtablesContext *ctx) { if (!ctx) return; - VIR_FREE(ctx->chain); - VIR_FREE(ctx); + g_free(ctx->chain); + g_free(ctx); } =20 =20 diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index 1a7b671179..6a2c6844e1 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -198,14 +198,14 @@ virFDStreamMsgFree(virFDStreamMsgPtr msg) =20 switch (msg->type) { case VIR_FDSTREAM_MSG_TYPE_DATA: - VIR_FREE(msg->stream.data.buf); + g_free(msg->stream.data.buf); break; case VIR_FDSTREAM_MSG_TYPE_HOLE: /* nada */ break; } =20 - VIR_FREE(msg); + g_free(msg); } =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFDStreamMsg, virFDStreamMsgFree); @@ -413,9 +413,9 @@ virFDStreamThreadDataFree(virFDStreamThreadDataPtr data) return; =20 virObjectUnref(data->st); - VIR_FREE(data->fdinname); - VIR_FREE(data->fdoutname); - VIR_FREE(data); + g_free(data->fdinname); + g_free(data->fdoutname); + g_free(data); } =20 =20 diff --git a/src/util/virfile.c b/src/util/virfile.c index e07f3d6b9c..e25cbe797e 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -382,9 +382,9 @@ virFileWrapperFdFree(virFileWrapperFdPtr wfd) if (!wfd) return; =20 - VIR_FREE(wfd->err_msg); + g_free(wfd->err_msg); virCommandFree(wfd->cmd); - VIR_FREE(wfd); + g_free(wfd); } =20 =20 diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index b84f0f5f48..8b69a18ecc 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -196,9 +196,9 @@ virFirewallRuleFree(virFirewallRulePtr rule) return; =20 for (i =3D 0; i < rule->argsLen; i++) - VIR_FREE(rule->args[i]); - VIR_FREE(rule->args); - VIR_FREE(rule); + g_free(rule->args[i]); + g_free(rule->args); + g_free(rule); } =20 =20 @@ -212,13 +212,13 @@ virFirewallGroupFree(virFirewallGroupPtr group) =20 for (i =3D 0; i < group->naction; i++) virFirewallRuleFree(group->action[i]); - VIR_FREE(group->action); + g_free(group->action); =20 for (i =3D 0; i < group->nrollback; i++) virFirewallRuleFree(group->rollback[i]); - VIR_FREE(group->rollback); + g_free(group->rollback); =20 - VIR_FREE(group); + g_free(group); } =20 =20 @@ -237,9 +237,9 @@ void virFirewallFree(virFirewallPtr firewall) =20 for (i =3D 0; i < firewall->ngroups; i++) virFirewallGroupFree(firewall->groups[i]); - VIR_FREE(firewall->groups); + g_free(firewall->groups); =20 - VIR_FREE(firewall); + g_free(firewall); } =20 #define VIR_FIREWALL_RETURN_IF_ERROR(firewall) \ diff --git a/src/util/virfirmware.c b/src/util/virfirmware.c index 6b8a64eafa..d49bea3a55 100644 --- a/src/util/virfirmware.c +++ b/src/util/virfirmware.c @@ -37,9 +37,9 @@ virFirmwareFree(virFirmwarePtr firmware) if (!firmware) return; =20 - VIR_FREE(firmware->name); - VIR_FREE(firmware->nvram); - VIR_FREE(firmware); + g_free(firmware->name); + g_free(firmware->nvram); + g_free(firmware); } =20 =20 @@ -51,7 +51,7 @@ virFirmwareFreeList(virFirmwarePtr *firmwares, size_t nfi= rmwares) for (i =3D 0; i < nfirmwares; i++) virFirmwareFree(firmwares[i]); =20 - VIR_FREE(firmwares); + g_free(firmwares); } =20 =20 diff --git a/src/util/virjson.c b/src/util/virjson.c index f85b61957c..a509943fde 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -398,28 +398,28 @@ virJSONValueFree(virJSONValuePtr value) switch ((virJSONType) value->type) { case VIR_JSON_TYPE_OBJECT: for (i =3D 0; i < value->data.object.npairs; i++) { - VIR_FREE(value->data.object.pairs[i].key); + g_free(value->data.object.pairs[i].key); virJSONValueFree(value->data.object.pairs[i].value); } - VIR_FREE(value->data.object.pairs); + g_free(value->data.object.pairs); break; case VIR_JSON_TYPE_ARRAY: for (i =3D 0; i < value->data.array.nvalues; i++) virJSONValueFree(value->data.array.values[i]); - VIR_FREE(value->data.array.values); + g_free(value->data.array.values); break; case VIR_JSON_TYPE_STRING: - VIR_FREE(value->data.string); + g_free(value->data.string); break; case VIR_JSON_TYPE_NUMBER: - VIR_FREE(value->data.number); + g_free(value->data.number); break; case VIR_JSON_TYPE_BOOLEAN: case VIR_JSON_TYPE_NULL: break; } =20 - VIR_FREE(value); + g_free(value); } =20 =20 diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index 71d5dfb83e..7df319004e 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -102,11 +102,11 @@ static void virLockSpaceResourceFree(virLockSpaceReso= urcePtr res) } } =20 - VIR_FREE(res->owners); + g_free(res->owners); VIR_FORCE_CLOSE(res->fd); - VIR_FREE(res->path); - VIR_FREE(res->name); - VIR_FREE(res); + g_free(res->path); + g_free(res->name); + g_free(res); } =20 =20 @@ -499,9 +499,9 @@ void virLockSpaceFree(virLockSpacePtr lockspace) return; =20 virHashFree(lockspace->resources); - VIR_FREE(lockspace->dir); + g_free(lockspace->dir); virMutexDestroy(&lockspace->lock); - VIR_FREE(lockspace); + g_free(lockspace); } =20 =20 diff --git a/src/util/virlog.c b/src/util/virlog.c index fad310a68a..cdfeba8251 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -339,8 +339,8 @@ virLogFilterFree(virLogFilterPtr filter) if (!filter) return; =20 - VIR_FREE(filter->match); - VIR_FREE(filter); + g_free(filter->match); + g_free(filter); } =20 =20 @@ -361,7 +361,7 @@ virLogFilterListFree(virLogFilterPtr *list, int count) =20 for (i =3D 0; i < count; i++) virLogFilterFree(list[i]); - VIR_FREE(list); + g_free(list); } =20 =20 @@ -387,8 +387,8 @@ virLogOutputFree(virLogOutputPtr output) =20 if (output->c) output->c(output->data); - VIR_FREE(output->name); - VIR_FREE(output); + g_free(output->name); + g_free(output); =20 } =20 @@ -410,7 +410,7 @@ virLogOutputListFree(virLogOutputPtr *list, int count) =20 for (i =3D 0; i < count; i++) virLogOutputFree(list[i]); - VIR_FREE(list); + g_free(list); } =20 =20 diff --git a/src/util/virmacaddr.c b/src/util/virmacaddr.c index 35918bca41..3811457f31 100644 --- a/src/util/virmacaddr.c +++ b/src/util/virmacaddr.c @@ -250,5 +250,5 @@ virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_= BUFLEN]) void virMacAddrFree(virMacAddrPtr addr) { - VIR_FREE(addr); + g_free(addr); } diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 46db6249de..1f5c2cba30 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -183,10 +183,10 @@ virMediatedDeviceFree(virMediatedDevicePtr dev) { if (!dev) return; - VIR_FREE(dev->path); - VIR_FREE(dev->used_by_drvname); - VIR_FREE(dev->used_by_domname); - VIR_FREE(dev); + g_free(dev->path); + g_free(dev->used_by_drvname); + g_free(dev->used_by_domname); + g_free(dev); } =20 =20 @@ -476,10 +476,10 @@ virMediatedDeviceTypeFree(virMediatedDeviceTypePtr ty= pe) if (!type) return; =20 - VIR_FREE(type->id); - VIR_FREE(type->name); - VIR_FREE(type->device_api); - VIR_FREE(type); + g_free(type->id); + g_free(type->name); + g_free(type->device_api); + g_free(type); } =20 =20 diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 6ee59989ed..2b4c8b6280 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -127,7 +127,7 @@ struct _virNetDevMcastEntry { static void virNetDevMcastEntryFree(virNetDevMcastEntryPtr entry) { - VIR_FREE(entry); + g_free(entry); } =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevMcastEntry, virNetDevMcastEntryFree= ); @@ -2868,11 +2868,11 @@ void virNetDevRxFilterFree(virNetDevRxFilterPtr filter) { if (filter) { - VIR_FREE(filter->name); - VIR_FREE(filter->unicast.table); - VIR_FREE(filter->multicast.table); - VIR_FREE(filter->vlan.table); - VIR_FREE(filter); + g_free(filter->name); + g_free(filter->unicast.table); + g_free(filter->multicast.table); + g_free(filter->vlan.table); + g_free(filter); } } =20 diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index c8eb5cfc79..612e8f985c 100644 --- a/src/util/virnetdevbandwidth.c +++ b/src/util/virnetdevbandwidth.c @@ -34,9 +34,9 @@ virNetDevBandwidthFree(virNetDevBandwidthPtr def) if (!def) return; =20 - VIR_FREE(def->in); - VIR_FREE(def->out); - VIR_FREE(def); + g_free(def->in); + g_free(def->out); + g_free(def); } =20 static void diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index fc7808cbaa..4eb8ef76d1 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -775,8 +775,8 @@ virNetDevIPRouteFree(virNetDevIPRoutePtr def) { if (!def) return; - VIR_FREE(def->family); - VIR_FREE(def); + g_free(def->family); + g_free(def); } =20 virSocketAddrPtr @@ -913,5 +913,5 @@ virNetDevIPInfoAddToDev(const char *ifname, void virNetDevIPAddrFree(virNetDevIPAddrPtr ip) { - VIR_FREE(ip); + g_free(ip); } diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 2deefe6589..ed677193af 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -563,11 +563,11 @@ static void virNetlinkCallbackDataFree(virNetlinkCallbackDataPtr calld) { if (calld) { - VIR_FREE(calld->cr_ifname); - VIR_FREE(calld->virtPortProfile); - VIR_FREE(calld->linkdev); + g_free(calld->cr_ifname); + g_free(calld->virtPortProfile); + g_free(calld->linkdev); } - VIR_FREE(calld); + g_free(calld); } =20 /** diff --git a/src/util/virnetdevvlan.c b/src/util/virnetdevvlan.c index 154d92497c..339290fe79 100644 --- a/src/util/virnetdevvlan.c +++ b/src/util/virnetdevvlan.c @@ -39,7 +39,7 @@ virNetDevVlanFree(virNetDevVlanPtr vlan) { if (vlan) virNetDevVlanClear(vlan); - VIR_FREE(vlan); + g_free(vlan); } =20 int diff --git a/src/util/virnvme.c b/src/util/virnvme.c index 66b73cd1d1..af297552c1 100644 --- a/src/util/virnvme.c +++ b/src/util/virnvme.c @@ -86,7 +86,7 @@ virNVMeDeviceFree(virNVMeDevicePtr dev) return; =20 virNVMeDeviceUsedByClear(dev); - VIR_FREE(dev); + g_free(dev); } =20 =20 diff --git a/src/util/virobject.c b/src/util/virobject.c index a6305354c3..ce40ffae22 100644 --- a/src/util/virobject.c +++ b/src/util/virobject.c @@ -632,7 +632,7 @@ virObjectListFree(void *list) for (next =3D (void **) list; *next; next++) virObjectUnref(*next); =20 - VIR_FREE(list); + g_free(list); } =20 =20 diff --git a/src/util/virpci.c b/src/util/virpci.c index ce6b132688..b8e8422aa0 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1520,11 +1520,11 @@ virPCIDeviceFree(virPCIDevicePtr dev) if (!dev) return; VIR_DEBUG("%s %s: freeing", dev->id, dev->name); - VIR_FREE(dev->name); - VIR_FREE(dev->path); - VIR_FREE(dev->used_by_drvname); - VIR_FREE(dev->used_by_domname); - VIR_FREE(dev); + g_free(dev->name); + g_free(dev->path); + g_free(dev->used_by_drvname); + g_free(dev->used_by_domname); + g_free(dev); } =20 /** @@ -2819,13 +2819,13 @@ virPCIEDeviceInfoFree(virPCIEDeviceInfoPtr dev) if (!dev) return; =20 - VIR_FREE(dev->link_cap); - VIR_FREE(dev->link_sta); - VIR_FREE(dev); + g_free(dev->link_cap); + g_free(dev->link_sta); + g_free(dev); } =20 void virPCIDeviceAddressFree(virPCIDeviceAddressPtr address) { - VIR_FREE(address); + g_free(address); } diff --git a/src/util/virperf.c b/src/util/virperf.c index 7f260d2da6..f6b9a3824b 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -394,5 +394,5 @@ virPerfFree(virPerfPtr perf) virPerfEventDisable(perf, i); } =20 - VIR_FREE(perf); + g_free(perf); } diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 76c6e43726..d694d53b5e 100644 --- a/src/util/virportallocator.c +++ b/src/util/virportallocator.c @@ -117,8 +117,8 @@ virPortAllocatorRangeFree(virPortAllocatorRangePtr rang= e) if (!range) return; =20 - VIR_FREE(range->name); - VIR_FREE(range); + g_free(range->name); + g_free(range); } =20 static int diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 67a921b44b..4ee95aa232 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -232,7 +232,7 @@ virResctrlInfoMonFree(virResctrlInfoMonPtr mon) return; =20 g_strfreev(mon->features); - VIR_FREE(mon); + g_free(mon); } =20 =20 @@ -2752,6 +2752,6 @@ virResctrlMonitorStatsFree(virResctrlMonitorStatsPtr = stat) return; =20 g_strfreev(stat->features); - VIR_FREE(stat->vals); - VIR_FREE(stat); + g_free(stat->vals); + g_free(stat); } diff --git a/src/util/virrotatingfile.c b/src/util/virrotatingfile.c index 9f1ef17c3e..718578765f 100644 --- a/src/util/virrotatingfile.c +++ b/src/util/virrotatingfile.c @@ -80,7 +80,7 @@ virRotatingFileWriterEntryFree(virRotatingFileWriterEntry= Ptr entry) return; =20 VIR_FORCE_CLOSE(entry->fd); - VIR_FREE(entry); + g_free(entry); } =20 =20 @@ -90,9 +90,9 @@ virRotatingFileReaderEntryFree(virRotatingFileReaderEntry= Ptr entry) if (!entry) return; =20 - VIR_FREE(entry->path); + g_free(entry->path); VIR_FORCE_CLOSE(entry->fd); - VIR_FREE(entry); + g_free(entry); } =20 =20 @@ -610,8 +610,8 @@ virRotatingFileWriterFree(virRotatingFileWriterPtr file) return; =20 virRotatingFileWriterEntryFree(file->entry); - VIR_FREE(file->basepath); - VIR_FREE(file); + g_free(file->basepath); + g_free(file); } =20 =20 @@ -631,6 +631,6 @@ virRotatingFileReaderFree(virRotatingFileReaderPtr file) =20 for (i =3D 0; i < file->nentries; i++) virRotatingFileReaderEntryFree(file->entries[i]); - VIR_FREE(file->entries); - VIR_FREE(file); + g_free(file->entries); + g_free(file); } diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 22d4679368..0c753c075e 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -222,9 +222,9 @@ virSCSIDeviceNew(const char *sysfs_prefix, static void virSCSIDeviceUsedByInfoFree(virUsedByInfoPtr used_by) { - VIR_FREE(used_by->drvname); - VIR_FREE(used_by->domname); - VIR_FREE(used_by); + g_free(used_by->drvname); + g_free(used_by->domname); + g_free(used_by); } G_DEFINE_AUTOPTR_CLEANUP_FUNC(virUsedByInfo, virSCSIDeviceUsedByInfoFree); =20 @@ -236,13 +236,13 @@ virSCSIDeviceFree(virSCSIDevicePtr dev) if (!dev) return; =20 - VIR_FREE(dev->id); - VIR_FREE(dev->name); - VIR_FREE(dev->sg_path); + g_free(dev->id); + g_free(dev->name); + g_free(dev->sg_path); for (i =3D 0; i < dev->n_used_by; i++) virSCSIDeviceUsedByInfoFree(dev->used_by[i]); - VIR_FREE(dev->used_by); - VIR_FREE(dev); + g_free(dev->used_by); + g_free(dev); } =20 int diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index a2bf9a446f..5907edbc7e 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -268,9 +268,9 @@ virSCSIVHostDeviceFree(virSCSIVHostDevicePtr dev) if (!dev) return; VIR_DEBUG("%s: freeing", dev->name); - VIR_FREE(dev->name); - VIR_FREE(dev->path); - VIR_FREE(dev->used_by_drvname); - VIR_FREE(dev->used_by_domname); - VIR_FREE(dev); + g_free(dev->name); + g_free(dev->path); + g_free(dev->used_by_drvname); + g_free(dev->used_by_domname); + g_free(dev); } diff --git a/src/util/virseclabel.c b/src/util/virseclabel.c index 174f344a8b..3dc2b74a9c 100644 --- a/src/util/virseclabel.c +++ b/src/util/virseclabel.c @@ -34,11 +34,11 @@ virSecurityLabelDefFree(virSecurityLabelDefPtr def) { if (!def) return; - VIR_FREE(def->model); - VIR_FREE(def->label); - VIR_FREE(def->imagelabel); - VIR_FREE(def->baselabel); - VIR_FREE(def); + g_free(def->model); + g_free(def->label); + g_free(def->imagelabel); + g_free(def->baselabel); + g_free(def); } =20 =20 @@ -47,9 +47,9 @@ virSecurityDeviceLabelDefFree(virSecurityDeviceLabelDefPt= r def) { if (!def) return; - VIR_FREE(def->model); - VIR_FREE(def->label); - VIR_FREE(def); + g_free(def->model); + g_free(def->label); + g_free(def); } =20 =20 diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index 65aaa632c7..8ac0ab5f5a 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -1307,5 +1307,5 @@ virSocketAddrPTRDomain(const virSocketAddr *addr, void virSocketAddrFree(virSocketAddrPtr addr) { - VIR_FREE(addr); + g_free(addr); } diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 28f7104145..995650334c 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -68,11 +68,11 @@ void virSysinfoBIOSDefFree(virSysinfoBIOSDefPtr def) if (def =3D=3D NULL) return; =20 - VIR_FREE(def->vendor); - VIR_FREE(def->version); - VIR_FREE(def->date); - VIR_FREE(def->release); - VIR_FREE(def); + g_free(def->vendor); + g_free(def->version); + g_free(def->date); + g_free(def->release); + g_free(def); } =20 void virSysinfoSystemDefFree(virSysinfoSystemDefPtr def) @@ -80,14 +80,14 @@ void virSysinfoSystemDefFree(virSysinfoSystemDefPtr def) if (def =3D=3D NULL) return; =20 - VIR_FREE(def->manufacturer); - VIR_FREE(def->product); - VIR_FREE(def->version); - VIR_FREE(def->serial); - VIR_FREE(def->uuid); - VIR_FREE(def->sku); - VIR_FREE(def->family); - VIR_FREE(def); + g_free(def->manufacturer); + g_free(def->product); + g_free(def->version); + g_free(def->serial); + g_free(def->uuid); + g_free(def->sku); + g_free(def->family); + g_free(def); } =20 void virSysinfoBaseBoardDefClear(virSysinfoBaseBoardDefPtr def) @@ -109,12 +109,12 @@ void virSysinfoChassisDefFree(virSysinfoChassisDefPtr= def) if (def =3D=3D NULL) return; =20 - VIR_FREE(def->manufacturer); - VIR_FREE(def->version); - VIR_FREE(def->serial); - VIR_FREE(def->asset); - VIR_FREE(def->sku); - VIR_FREE(def); + g_free(def->manufacturer); + g_free(def->version); + g_free(def->serial); + g_free(def->asset); + g_free(def->sku); + g_free(def); } =20 =20 @@ -126,10 +126,10 @@ void virSysinfoOEMStringsDefFree(virSysinfoOEMStrings= DefPtr def) return; =20 for (i =3D 0; i < def->nvalues; i++) - VIR_FREE(def->values[i]); - VIR_FREE(def->values); + g_free(def->values[i]); + g_free(def->values); =20 - VIR_FREE(def); + g_free(def); } =20 =20 @@ -164,45 +164,45 @@ void virSysinfoDefFree(virSysinfoDefPtr def) =20 for (i =3D 0; i < def->nbaseBoard; i++) virSysinfoBaseBoardDefClear(def->baseBoard + i); - VIR_FREE(def->baseBoard); + g_free(def->baseBoard); =20 virSysinfoChassisDefFree(def->chassis); =20 for (i =3D 0; i < def->nprocessor; i++) { - VIR_FREE(def->processor[i].processor_socket_destination); - VIR_FREE(def->processor[i].processor_type); - VIR_FREE(def->processor[i].processor_family); - VIR_FREE(def->processor[i].processor_manufacturer); - VIR_FREE(def->processor[i].processor_signature); - VIR_FREE(def->processor[i].processor_version); - VIR_FREE(def->processor[i].processor_external_clock); - VIR_FREE(def->processor[i].processor_max_speed); - VIR_FREE(def->processor[i].processor_status); - VIR_FREE(def->processor[i].processor_serial_number); - VIR_FREE(def->processor[i].processor_part_number); + g_free(def->processor[i].processor_socket_destination); + g_free(def->processor[i].processor_type); + g_free(def->processor[i].processor_family); + g_free(def->processor[i].processor_manufacturer); + g_free(def->processor[i].processor_signature); + g_free(def->processor[i].processor_version); + g_free(def->processor[i].processor_external_clock); + g_free(def->processor[i].processor_max_speed); + g_free(def->processor[i].processor_status); + g_free(def->processor[i].processor_serial_number); + g_free(def->processor[i].processor_part_number); } - VIR_FREE(def->processor); + g_free(def->processor); for (i =3D 0; i < def->nmemory; i++) { - VIR_FREE(def->memory[i].memory_size); - VIR_FREE(def->memory[i].memory_form_factor); - VIR_FREE(def->memory[i].memory_locator); - VIR_FREE(def->memory[i].memory_bank_locator); - VIR_FREE(def->memory[i].memory_type); - VIR_FREE(def->memory[i].memory_type_detail); - VIR_FREE(def->memory[i].memory_speed); - VIR_FREE(def->memory[i].memory_manufacturer); - VIR_FREE(def->memory[i].memory_serial_number); - VIR_FREE(def->memory[i].memory_part_number); + g_free(def->memory[i].memory_size); + g_free(def->memory[i].memory_form_factor); + g_free(def->memory[i].memory_locator); + g_free(def->memory[i].memory_bank_locator); + g_free(def->memory[i].memory_type); + g_free(def->memory[i].memory_type_detail); + g_free(def->memory[i].memory_speed); + g_free(def->memory[i].memory_manufacturer); + g_free(def->memory[i].memory_serial_number); + g_free(def->memory[i].memory_part_number); } - VIR_FREE(def->memory); + g_free(def->memory); =20 virSysinfoOEMStringsDefFree(def->oemStrings); =20 for (i =3D 0; i < def->nfw_cfgs; i++) virSysinfoFWCfgDefClear(&def->fw_cfgs[i]); - VIR_FREE(def->fw_cfgs); + g_free(def->fw_cfgs); =20 - VIR_FREE(def); + g_free(def); } =20 =20 diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c index edd29f0fdd..3f689365e4 100644 --- a/src/util/virsystemd.c +++ b/src/util/virsystemd.c @@ -640,8 +640,8 @@ virSystemdActivationEntryFree(void *data) VIR_FORCE_CLOSE(ent->fds[i]); } =20 - VIR_FREE(ent->fds); - VIR_FREE(ent); + g_free(ent->fds); + g_free(ent); } =20 =20 @@ -1048,5 +1048,5 @@ virSystemdActivationFree(virSystemdActivationPtr act) =20 virHashFree(act->fds); =20 - VIR_FREE(act); + g_free(act); } diff --git a/src/util/virthreadpool.c b/src/util/virthreadpool.c index 3942633431..942cfa48b1 100644 --- a/src/util/virthreadpool.c +++ b/src/util/virthreadpool.c @@ -305,14 +305,14 @@ void virThreadPoolFree(virThreadPoolPtr pool) virMutexLock(&pool->mutex); virThreadPoolDrainLocked(pool); =20 - VIR_FREE(pool->workers); + g_free(pool->workers); virMutexUnlock(&pool->mutex); virMutexDestroy(&pool->mutex); virCondDestroy(&pool->quit_cond); virCondDestroy(&pool->cond); - VIR_FREE(pool->prioWorkers); + g_free(pool->prioWorkers); virCondDestroy(&pool->prioCond); - VIR_FREE(pool); + g_free(pool); } =20 =20 diff --git a/src/util/virtypedparam-public.c b/src/util/virtypedparam-publi= c.c index 0ddb618dbf..91603cfe1c 100644 --- a/src/util/virtypedparam-public.c +++ b/src/util/virtypedparam-public.c @@ -880,5 +880,5 @@ virTypedParamsFree(virTypedParameterPtr params, int nparams) { virTypedParamsClear(params, nparams); - VIR_FREE(params); + g_free(params); } diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 43af4a7c56..f9ab6f6042 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -485,11 +485,11 @@ virTypedParamsRemoteFree(virTypedParameterRemotePtr r= emote_params_val, return; =20 for (i =3D 0; i < remote_params_len; i++) { - VIR_FREE(remote_params_val[i].field); + g_free(remote_params_val[i].field); if (remote_params_val[i].value.type =3D=3D VIR_TYPED_PARAM_STRING) - VIR_FREE(remote_params_val[i].value.remote_typed_param_value.s= ); + g_free(remote_params_val[i].value.remote_typed_param_value.s); } - VIR_FREE(remote_params_val); + g_free(remote_params_val); } =20 =20 @@ -724,7 +724,7 @@ virTypedParamListFree(virTypedParamListPtr list) return; =20 virTypedParamsFree(list->par, list->npar); - VIR_FREE(list); + g_free(list); } =20 =20 diff --git a/src/util/viruri.c b/src/util/viruri.c index ef5ab363d6..0aafd49d6d 100644 --- a/src/util/viruri.c +++ b/src/util/viruri.c @@ -279,20 +279,20 @@ void virURIFree(virURIPtr uri) if (!uri) return; =20 - VIR_FREE(uri->scheme); - VIR_FREE(uri->server); - VIR_FREE(uri->user); - VIR_FREE(uri->path); - VIR_FREE(uri->query); - VIR_FREE(uri->fragment); + g_free(uri->scheme); + g_free(uri->server); + g_free(uri->user); + g_free(uri->path); + g_free(uri->query); + g_free(uri->fragment); =20 for (i =3D 0; i < uri->paramsCount; i++) { - VIR_FREE(uri->params[i].name); - VIR_FREE(uri->params[i].value); + g_free(uri->params[i].name); + g_free(uri->params[i].value); } - VIR_FREE(uri->params); + g_free(uri->params); =20 - VIR_FREE(uri); + g_free(uri); } =20 =20 diff --git a/src/util/virusb.c b/src/util/virusb.c index a8afd6e6f0..ae400de656 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -354,10 +354,10 @@ virUSBDeviceFree(virUSBDevicePtr dev) if (!dev) return; VIR_DEBUG("%s %s: freeing", dev->id, dev->name); - VIR_FREE(dev->path); - VIR_FREE(dev->used_by_drvname); - VIR_FREE(dev->used_by_domname); - VIR_FREE(dev); + g_free(dev->path); + g_free(dev->used_by_drvname); + g_free(dev->used_by_domname); + g_free(dev); } =20 int diff --git a/src/util/virxml.c b/src/util/virxml.c index 7df50e4b4d..0354251941 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1312,12 +1312,12 @@ virXMLValidatorFree(virXMLValidatorPtr validator) if (!validator) return; =20 - VIR_FREE(validator->schemafile); + g_free(validator->schemafile); virBufferFreeAndReset(&validator->buf); xmlRelaxNGFreeParserCtxt(validator->rngParser); xmlRelaxNGFreeValidCtxt(validator->rngValid); xmlRelaxNGFree(validator->rng); - VIR_FREE(validator); + g_free(validator); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411146; cv=none; d=zohomail.com; s=zohoarc; b=G6PA9iTpnKNbowa0t088FldjWyA8UVPgdgUaBij4BknvgV4LETL5dFYye4MJLDtRdiTTD1zKW6zb2f6rD+n4rev6iho5OeTUmvPXro7kMHdaqpTOCseMzBahmcSWqN+wCWYGOa1Bxo2JWeZedfaaxkMtoE3KQM2NE6MNy8pBKis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411146; 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=BBY+jb2EKJWA3mymo4fuUZNql+CJk8X6IrXVIvFIxXE=; b=j+0s7HDhsypFaCT1AXKHHZSO6UpxpnURBojeqNrngiQf7GoAbNRiLi5ZJr0M/Fp9dMDR0K6r0xCV5LIiDVs8vwt0YdCP5Hz1KRLSndW/LN19kCdP4SV2gzstMuZRz2HGCrx6Hitf7agknM60syEysDAFhvd3IM/Evs2kFxSQVaE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411146652236.03862695104635; Wed, 3 Feb 2021 19:59:06 -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-398-EpA6th1PPkyIIHDKWiIYow-1; Wed, 03 Feb 2021 22:58:17 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3CC9801963; Thu, 4 Feb 2021 03:58:11 +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 B06B21A266; Thu, 4 Feb 2021 03:58:11 +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 7AC321809C90; Thu, 4 Feb 2021 03:58:11 +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 1143w2up003346 for ; Wed, 3 Feb 2021 22:58:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 029F55B697; Thu, 4 Feb 2021 03:58:02 +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 C1CDE5B695 for ; Thu, 4 Feb 2021 03:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411145; 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=BBY+jb2EKJWA3mymo4fuUZNql+CJk8X6IrXVIvFIxXE=; b=LJdukinpEmo/e2TgA8pqvhWdPe7jzIfaOuh8lSnZ9BDBO3kpWLd+00jnbn1QAvrMBA+WXa z1QlsrF6FOwQmkngWhfhQHeTEirCJeR6IzD7vZxoxKu1uPDWp9cF4HRZdK8fCZckKnb7YK FbrIr/1Xk0HetUwpJDHH+c4gRQSL5vM= X-MC-Unique: EpA6th1PPkyIIHDKWiIYow-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 03/24] bhyve: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:30 -0500 Message-Id: <20210204035751.164765-4-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.84 on 10.5.11.23 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 Reviewed-by: Daniel Henrique Barboza --- src/bhyve/bhyve_conf.c | 6 +++--- src/bhyve/bhyve_domain.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bhyve/bhyve_conf.c b/src/bhyve/bhyve_conf.c index f3e2ebf7c7..9012eb8b5f 100644 --- a/src/bhyve/bhyve_conf.c +++ b/src/bhyve/bhyve_conf.c @@ -109,8 +109,8 @@ bhyveDomainCmdlineDefFree(bhyveDomainCmdlineDefPtr def) return; =20 for (i =3D 0; i < def->num_args; i++) - VIR_FREE(def->args[i]); + g_free(def->args[i]); =20 - VIR_FREE(def->args); - VIR_FREE(def); + g_free(def->args); + g_free(def); } diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index f0e553113f..1d99ba6c96 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -50,7 +50,7 @@ bhyveDomainObjPrivateFree(void *data) =20 virDomainPCIAddressSetFree(priv->pciaddrs); =20 - VIR_FREE(priv); + g_free(priv); } =20 virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks =3D { --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411093; cv=none; d=zohomail.com; s=zohoarc; b=gXYDL8XltYg/NsxST2zjWzIGCnZDGmpJlSldlFHiVEAjHEEwGOj0modJ6/ABnAZrBFd4FkN0MtZSev/8AJK7V8HsxTbsvsegH/vFBxKkeBdesytvgRQqjOflCVUUyg70NGvZG/hDgBbwBRA2SKkxgIRcktGm48WrxuSoGsvc40c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411093; 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=0DGhZugHfBTFVh/ssihQvo/ro3xwNMMD/K5EuiO/Bxo=; b=gNP6VshZNcI/WflQIZG/aL9scogYue99lf/x3s2cTlSPfyu1F0kaVobcp9tqMHpR9uPJkQAEOIsOnUh1xwIMspnMuhbyIi3JPljWaRfCR8tqGVhq2YWPM7WY3kn6f/lFGSJ/xYxdeXA0b+5ucD8qmMN+afhyFPRuoVHLomsYDg4= 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 1612411093744105.21197985256788; Wed, 3 Feb 2021 19:58:13 -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-551-UMGwNTfDOhqaurYbrp1hTA-1; Wed, 03 Feb 2021 22:58:10 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2905715722; Thu, 4 Feb 2021 03:58:05 +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 04A9C60C9B; Thu, 4 Feb 2021 03:58:05 +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 B7D8E18095CD; Thu, 4 Feb 2021 03:58:04 +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 1143w2XJ003351 for ; Wed, 3 Feb 2021 22:58:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 59AA65B697; Thu, 4 Feb 2021 03:58:02 +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 246D65B695 for ; Thu, 4 Feb 2021 03:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411092; 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=0DGhZugHfBTFVh/ssihQvo/ro3xwNMMD/K5EuiO/Bxo=; b=TsvnqL1Ib2Rjtr+i8W5pbI64WyApZ8PeLjoMISKogSlo0FY+BgMChH+RCuyrsZ/R3xMmkK X4/jdjS2gNA8ZdGOY5XccoWwYoSnUf9VuMBy6zpFP7WIFGTY/4RnQaaWvSYFPENESVCpDZ wWSFPuvbEB447r4cWGl40btLpdk4hkM= X-MC-Unique: UMGwNTfDOhqaurYbrp1hTA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 04/24] libxl: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:31 -0500 Message-Id: <20210204035751.164765-5-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.13 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 Reviewed-by: Daniel Henrique Barboza --- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 2 +- src/libxl/libxl_migration.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 380f7e0b56..3bcd369d12 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -239,7 +239,7 @@ libxlDomainObjPrivateFree(void *data) { libxlDomainObjPrivatePtr priv =3D data; =20 - VIR_FREE(priv->lockState); + g_free(priv->lockState); virObjectUnref(priv); } =20 diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index f480f8067e..2e002b2930 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -127,7 +127,7 @@ libxlDomainManagedSaveLoad(virDomainObjPtr vm, static void libxlOSEventHookInfoFree(void *obj) { - VIR_FREE(obj); + g_free(obj); } =20 static void diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 2925aaaa6d..72b6cb32cb 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -82,9 +82,9 @@ libxlMigrationCookieFree(libxlMigrationCookiePtr mig) if (!mig) return; =20 - VIR_FREE(mig->srcHostname); - VIR_FREE(mig->name); - VIR_FREE(mig); + g_free(mig->srcHostname); + g_free(mig->name); + g_free(mig); } =20 static libxlMigrationCookiePtr --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411100; cv=none; d=zohomail.com; s=zohoarc; b=LMWKoowievVB5OSTVIom2UjVlAmH8s0kcR/cnZlF3fhPIXZxRE8wUCC9Cp4vWSPgfijCG7Mo7vkjMwVJVcxB4cYB1WJZ5m4GlVAq4RO3LKJE9cl/mV5wfSCct7nRNPK+HxCjz9yN7ZiP88v4lrfQMiJuuU88/UC7DW7nMlNbI4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411100; 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=5j1wMZtVAvMAxj+sp1UuR129x9UvJEOHifBZMCcS+xw=; b=EhJXhJZlejJD8Y4oMlm1DTI0F/Nl9XR6Hzjr5g6TIK0nkM4OSKofBPX7A1/pGd3styuhxs6/gSaaOz6sSDjbPzhw94jAnG9dNsoPIjgqn96CAeatwNSf02Pun2PRwoComtexb9ulz0iZxvWIHzhpt8EYLUwITeM+69AEKhkOwbI= 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 1612411100118973.6411430262034; Wed, 3 Feb 2021 19:58:20 -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-533-x8Kd4f20ObqpJE4v273jXQ-1; Wed, 03 Feb 2021 22:58:16 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E01F2801964; Thu, 4 Feb 2021 03:58:09 +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 B57CF1A266; Thu, 4 Feb 2021 03:58:09 +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 8156F1809C8F; Thu, 4 Feb 2021 03:58:09 +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 1143w2rH003356 for ; Wed, 3 Feb 2021 22:58:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id B1D265B697; Thu, 4 Feb 2021 03:58:02 +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 7C2305B695 for ; Thu, 4 Feb 2021 03:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411099; 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=5j1wMZtVAvMAxj+sp1UuR129x9UvJEOHifBZMCcS+xw=; b=YgRErFey/X4gLMZl4M0XQoesnTkSFsVM+NZ6i4rhD5bcFbxRYsnSKVcLcb5TcIJZM6syBz eAjkltMBRoCmp4yso+ujctNG6+4/n1RxWzw7Pcwpyv9sdC6m7pzyJwWWopCXh3vuEVGI0n EVKBS6zhISavC8VKOUYiDBOf89KPO/Y= X-MC-Unique: x8Kd4f20ObqpJE4v273jXQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 05/24] qemu: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:32 -0500 Message-Id: <20210204035751.164765-6-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.84 on 10.5.11.23 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 Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_block.c | 36 ++++++++++++------------ src/qemu/qemu_capabilities.c | 8 +++--- src/qemu/qemu_cgroup.c | 4 +-- src/qemu/qemu_conf.c | 6 ++-- src/qemu/qemu_domain.c | 14 +++++----- src/qemu/qemu_firmware.c | 10 +++---- src/qemu/qemu_migration_params.c | 4 +-- src/qemu/qemu_monitor.c | 48 ++++++++++++++++---------------- src/qemu/qemu_monitor_json.c | 22 +++++++-------- src/qemu/qemu_process.c | 24 ++++++++-------- src/qemu/qemu_saveimage.c | 6 ++-- src/qemu/qemu_slirp.c | 2 +- src/qemu/qemu_vhost_user.c | 8 +++--- 13 files changed, 96 insertions(+), 96 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 0b8ca2a3f5..3d88e701b2 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -77,17 +77,17 @@ qemuBlockNodeNameBackingChainDataFree(qemuBlockNodeName= BackingChainDataPtr data) if (!data) return; =20 - VIR_FREE(data->nodeformat); - VIR_FREE(data->nodestorage); + g_free(data->nodeformat); + g_free(data->nodestorage); =20 - VIR_FREE(data->qemufilename); + g_free(data->qemufilename); =20 - VIR_FREE(data->drvformat); - VIR_FREE(data->drvstorage); + g_free(data->drvformat); + g_free(data->drvstorage); =20 qemuBlockNodeNameBackingChainDataFree(data->backing); =20 - VIR_FREE(data); + g_free(data); } =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockNodeNameBackingChainData, @@ -1635,16 +1635,16 @@ qemuBlockStorageSourceAttachDataFree(qemuBlockStora= geSourceAttachDataPtr data) virJSONValueFree(data->encryptsecretProps); virJSONValueFree(data->tlsProps); virJSONValueFree(data->tlsKeySecretProps); - VIR_FREE(data->tlsAlias); - VIR_FREE(data->tlsKeySecretAlias); - VIR_FREE(data->authsecretAlias); - VIR_FREE(data->encryptsecretAlias); - VIR_FREE(data->httpcookiesecretAlias); - VIR_FREE(data->driveCmd); - VIR_FREE(data->driveAlias); - VIR_FREE(data->chardevAlias); - VIR_FREE(data->chardevCmd); - VIR_FREE(data); + g_free(data->tlsAlias); + g_free(data->tlsKeySecretAlias); + g_free(data->authsecretAlias); + g_free(data->encryptsecretAlias); + g_free(data->httpcookiesecretAlias); + g_free(data->driveCmd); + g_free(data->driveAlias); + g_free(data->chardevAlias); + g_free(data->chardevCmd); + g_free(data); } =20 =20 @@ -1960,8 +1960,8 @@ qemuBlockStorageSourceChainDataFree(qemuBlockStorageS= ourceChainDataPtr data) for (i =3D 0; i < data->nsrcdata; i++) qemuBlockStorageSourceAttachDataFree(data->srcdata[i]); =20 - VIR_FREE(data->srcdata); - VIR_FREE(data); + g_free(data->srcdata); + g_free(data); } =20 =20 diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 109a7ed9de..c57864f602 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4112,10 +4112,10 @@ virQEMUCapsCachePrivFree(void *privData) { virQEMUCapsCachePrivPtr priv =3D privData; =20 - VIR_FREE(priv->libDir); - VIR_FREE(priv->kernelVersion); - VIR_FREE(priv->hostCPUSignature); - VIR_FREE(priv); + g_free(priv->libDir); + g_free(priv->kernelVersion); + g_free(priv->hostCPUSignature); + g_free(priv); } =20 =20 diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index cb8112ea90..39c83d1478 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -1215,8 +1215,8 @@ qemuCgroupEmulatorAllNodesDataFree(qemuCgroupEmulator= AllNodesDataPtr data) return; =20 virCgroupFree(data->emulatorCgroup); - VIR_FREE(data->emulatorMemMask); - VIR_FREE(data); + g_free(data->emulatorMemMask); + g_free(data); } =20 =20 diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 151bea01eb..eae94bb5a2 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1579,9 +1579,9 @@ qemuSharedDeviceEntryFree(void *payload) return; =20 for (i =3D 0; i < entry->ref; i++) - VIR_FREE(entry->domains[i]); - VIR_FREE(entry->domains); - VIR_FREE(entry); + g_free(entry->domains[i]); + g_free(entry->domains); + g_free(entry); } =20 =20 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a970de619e..6ab8a94b73 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1803,8 +1803,8 @@ qemuDomainObjPrivateFree(void *data) =20 virObjectUnref(priv->monConfig); qemuDomainObjClearJob(&priv->job); - VIR_FREE(priv->lockState); - VIR_FREE(priv->origname); + g_free(priv->lockState); + g_free(priv->origname); =20 virChrdevFree(priv->devs); =20 @@ -1817,7 +1817,7 @@ qemuDomainObjPrivateFree(void *data) VIR_ERROR(_("Unexpected QEMU agent still active during domain dele= tion")); qemuAgentClose(priv->agent); } - VIR_FREE(priv->cleanupCallbacks); + g_free(priv->cleanupCallbacks); =20 g_clear_pointer(&priv->migSecinfo, qemuDomainSecretInfoFree); qemuDomainMasterKeyFree(priv); @@ -1830,7 +1830,7 @@ qemuDomainObjPrivateFree(void *data) g_object_unref(priv->eventThread); } =20 - VIR_FREE(priv); + g_free(priv); } =20 =20 @@ -3238,7 +3238,7 @@ qemuDomainXmlNsDefFree(qemuDomainXmlNsDefPtr def) virStringListFreeCount(def->capsadd, def->ncapsadd); virStringListFreeCount(def->capsdel, def->ncapsdel); =20 - VIR_FREE(def); + g_free(def); } =20 =20 @@ -10845,7 +10845,7 @@ qemuProcessEventFree(struct qemuProcessEvent *event) case QEMU_PROCESS_EVENT_BLOCK_JOB: case QEMU_PROCESS_EVENT_MONITOR_EOF: case QEMU_PROCESS_EVENT_GUEST_CRASHLOADED: - VIR_FREE(event->data); + g_free(event->data); break; case QEMU_PROCESS_EVENT_JOB_STATUS_CHANGE: virObjectUnref(event->data); @@ -10854,7 +10854,7 @@ qemuProcessEventFree(struct qemuProcessEvent *event) case QEMU_PROCESS_EVENT_LAST: break; } - VIR_FREE(event); + g_free(event); } =20 =20 diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 639cff7459..fe30db4f79 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -180,7 +180,7 @@ struct _qemuFirmware { static void qemuFirmwareOSInterfaceFree(qemuFirmwareOSInterface *interfaces) { - VIR_FREE(interfaces); + g_free(interfaces); } =20 =20 @@ -245,7 +245,7 @@ qemuFirmwareTargetFree(qemuFirmwareTargetPtr target) =20 virStringListFreeCount(target->machines, target->nmachines); =20 - VIR_FREE(target); + g_free(target); } =20 =20 @@ -255,7 +255,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareTarget, qemuF= irmwareTargetFree); static void qemuFirmwareFeatureFree(qemuFirmwareFeature *features) { - VIR_FREE(features); + g_free(features); } =20 =20 @@ -274,10 +274,10 @@ qemuFirmwareFree(qemuFirmwarePtr fw) qemuFirmwareMappingFree(fw->mapping); for (i =3D 0; i < fw->ntargets; i++) qemuFirmwareTargetFree(fw->targets[i]); - VIR_FREE(fw->targets); + g_free(fw->targets); qemuFirmwareFeatureFree(fw->features); =20 - VIR_FREE(fw); + g_free(fw); } =20 =20 diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 8c019bf2ce..510dad783a 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -261,11 +261,11 @@ qemuMigrationParamsFree(qemuMigrationParamsPtr migPar= ams) =20 for (i =3D 0; i < QEMU_MIGRATION_PARAM_LAST; i++) { if (qemuMigrationParamTypes[i] =3D=3D QEMU_MIGRATION_PARAM_TYPE_ST= RING) - VIR_FREE(migParams->params[i].value.s); + g_free(migParams->params[i].value.s); } =20 virBitmapFree(migParams->caps); - VIR_FREE(migParams); + g_free(migParams); } =20 =20 diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 990519252e..2d9c9754d1 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1674,7 +1674,7 @@ qemuMonitorCPUInfoFree(qemuMonitorCPUInfoPtr cpus, =20 qemuMonitorCPUInfoClear(cpus, ncpus); =20 - VIR_FREE(cpus); + g_free(cpus); } =20 void @@ -1687,9 +1687,9 @@ qemuMonitorQueryCpusFree(struct qemuMonitorQueryCpusE= ntry *entries, return; =20 for (i =3D 0; i < nentries; i++) - VIR_FREE(entries[i].qom_path); + g_free(entries[i].qom_path); =20 - VIR_FREE(entries); + g_free(entries); } =20 =20 @@ -2085,8 +2085,8 @@ qemuDomainDiskInfoFree(void *value) { struct qemuDomainDiskInfo *info =3D value; =20 - VIR_FREE(info->nodename); - VIR_FREE(info); + g_free(info->nodename); + g_free(info); } =20 =20 @@ -2871,8 +2871,8 @@ qemuMonitorChardevInfoFree(void *data) { qemuMonitorChardevInfoPtr info =3D data; =20 - VIR_FREE(info->ptyPath); - VIR_FREE(info); + g_free(info->ptyPath); + g_free(info); } =20 =20 @@ -3603,11 +3603,11 @@ qemuMonitorMachineInfoFree(qemuMonitorMachineInfoPt= r machine) { if (!machine) return; - VIR_FREE(machine->name); - VIR_FREE(machine->alias); - VIR_FREE(machine->defaultCPU); - VIR_FREE(machine->defaultRAMid); - VIR_FREE(machine); + g_free(machine->name); + g_free(machine->alias); + g_free(machine->defaultCPU); + g_free(machine->defaultRAMid); + g_free(machine); } =20 =20 @@ -3735,14 +3735,14 @@ qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo= Ptr model_info) return; =20 for (i =3D 0; i < model_info->nprops; i++) { - VIR_FREE(model_info->props[i].name); + g_free(model_info->props[i].name); if (model_info->props[i].type =3D=3D QEMU_MONITOR_CPU_PROPERTY_STR= ING) - VIR_FREE(model_info->props[i].value.string); + g_free(model_info->props[i].value.string); } =20 - VIR_FREE(model_info->props); - VIR_FREE(model_info->name); - VIR_FREE(model_info); + g_free(model_info->props); + g_free(model_info->name); + g_free(model_info); } =20 =20 @@ -4378,7 +4378,7 @@ qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicIn= foPtr info) =20 switch (info->type) { case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_S390: - VIR_FREE(info->data.s390.reason); + g_free(info->data.s390.reason); break; case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE: case QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_HYPERV: @@ -4386,7 +4386,7 @@ qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicIn= foPtr info) break; } =20 - VIR_FREE(info); + g_free(info); } =20 =20 @@ -4396,8 +4396,8 @@ qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidS= tatusPtr info) if (!info) return; =20 - VIR_FREE(info->netdev); - VIR_FREE(info); + g_free(info->netdev); + g_free(info); } =20 =20 @@ -4588,9 +4588,9 @@ qemuMonitorJobInfoFree(qemuMonitorJobInfoPtr job) if (!job) return; =20 - VIR_FREE(job->id); - VIR_FREE(job->error); - VIR_FREE(job); + g_free(job->id); + g_free(job->error); + g_free(job); } =20 =20 diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 97c5e5b36c..a02d29d52a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -591,11 +591,11 @@ qemuMonitorJSONParseKeywordsFree(int nkeywords, { size_t i; for (i =3D 0; i < nkeywords; i++) { - VIR_FREE(keywords[i]); - VIR_FREE(values[i]); + g_free(keywords[i]); + g_free(values[i]); } - VIR_FREE(keywords); - VIR_FREE(values); + g_free(keywords); + g_free(values); } =20 =20 @@ -6561,9 +6561,9 @@ void qemuMonitorJSONListPathFree(qemuMonitorJSONListP= athPtr paths) { if (!paths) return; - VIR_FREE(paths->name); - VIR_FREE(paths->type); - VIR_FREE(paths); + g_free(paths->name); + g_free(paths->type); + g_free(paths); } =20 =20 @@ -8573,13 +8573,13 @@ qemuMonitorQueryHotpluggableCpusFree(struct qemuMon= itorQueryHotpluggableCpusEntr for (i =3D 0; i < nentries; i++) { entry =3D entries + i; =20 - VIR_FREE(entry->type); - VIR_FREE(entry->qom_path); - VIR_FREE(entry->alias); + g_free(entry->type); + g_free(entry->qom_path); + g_free(entry->alias); virJSONValueFree(entry->props); } =20 - VIR_FREE(entries); + g_free(entries); } =20 =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f87a3c0f60..30cfa4d485 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4604,10 +4604,10 @@ qemuProcessIncomingDefFree(qemuProcessIncomingDefPt= r inc) if (!inc) return; =20 - VIR_FREE(inc->address); - VIR_FREE(inc->launchURI); - VIR_FREE(inc->deferredURI); - VIR_FREE(inc); + g_free(inc->address); + g_free(inc->launchURI); + g_free(inc->deferredURI); + g_free(inc); } =20 =20 @@ -8713,14 +8713,14 @@ qemuProcessQMPFree(qemuProcessQMPPtr proc) =20 g_object_unref(proc->eventThread); =20 - VIR_FREE(proc->binary); - VIR_FREE(proc->libDir); - VIR_FREE(proc->uniqDir); - VIR_FREE(proc->monpath); - VIR_FREE(proc->monarg); - VIR_FREE(proc->pidfile); - VIR_FREE(proc->stdErr); - VIR_FREE(proc); + g_free(proc->binary); + g_free(proc->libDir); + g_free(proc->uniqDir); + g_free(proc->monpath); + g_free(proc->monarg); + g_free(proc->pidfile); + g_free(proc->stdErr); + g_free(proc); } =20 =20 diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 0e588d463d..de2d63dd9a 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src/qemu/qemu_saveimage.c @@ -83,9 +83,9 @@ virQEMUSaveDataFree(virQEMUSaveDataPtr data) if (!data) return; =20 - VIR_FREE(data->xml); - VIR_FREE(data->cookie); - VIR_FREE(data); + g_free(data->xml); + g_free(data->cookie); + g_free(data); } =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virQEMUSaveData, virQEMUSaveDataFree); diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index 4c4949f88b..62a6665679 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@ -58,7 +58,7 @@ qemuSlirpFree(qemuSlirpPtr slirp) VIR_FORCE_CLOSE(slirp->fd[0]); VIR_FORCE_CLOSE(slirp->fd[1]); virBitmapFree(slirp->features); - VIR_FREE(slirp); + g_free(slirp); } =20 =20 diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c index 0a69d690ca..5ceefbe456 100644 --- a/src/qemu/qemu_vhost_user.c +++ b/src/qemu/qemu_vhost_user.c @@ -113,7 +113,7 @@ struct _qemuVhostUser { static void qemuVhostUserGPUFeatureFree(qemuVhostUserGPUFeature *features) { - VIR_FREE(features); + g_free(features); } =20 =20 @@ -127,11 +127,11 @@ qemuVhostUserFree(qemuVhostUserPtr vu) return; =20 if (vu->type =3D=3D QEMU_VHOST_USER_TYPE_GPU) - VIR_FREE(vu->capabilities.gpu.features); + g_free(vu->capabilities.gpu.features); =20 - VIR_FREE(vu->binary); + g_free(vu->binary); =20 - VIR_FREE(vu); + g_free(vu); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411098; cv=none; d=zohomail.com; s=zohoarc; b=GrdYkhoO6jzoIhNoPE/pOLAa8O+b0vccg97sXLbEJ7D6Uz/U7vJapcCasXpf51/mI+Y3Q/cI8O5QWyoIF4f+IcXrarHd2IDfJ1kLBo2Ce4LLVRUXoG6SAzCVq4x6X4g61z+c1F20tv68Q3K/xSp4HOgCRoSy0WYLQSYcQEgfVNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411098; 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=NlxuOYXG0QZLBAggloaEXjnjmEZautF9xNRUEEuBF8Y=; b=Lsw2F4iL25PqhNVwoHedjBLQeZfmkcCrVm5XWK08/exBZqWi7g9vsirP9vbZAcRcJZxNpvaVpwvXsDIMqWjlqp1QbKPuZM8o1Gx0C4stovlV5eTa1gJy6uMy+l9k8o8Pn3nIMlgul/e6uZT7SPnFAQB7/zJbbdRnZAFrbDl6Gns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 161241109886929.071619641763505; Wed, 3 Feb 2021 19:58:18 -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-106-j12YUoTaNdmngzBtr_AQkA-1; Wed, 03 Feb 2021 22:58:15 -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 D677D8030BB; Thu, 4 Feb 2021 03:58:09 +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 B45F15D9EF; Thu, 4 Feb 2021 03:58:09 +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 7F72A57DFE; Thu, 4 Feb 2021 03:58:09 +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 1143w3HV003366 for ; Wed, 3 Feb 2021 22:58:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1335D5B697; Thu, 4 Feb 2021 03:58:03 +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 D2A225B695 for ; Thu, 4 Feb 2021 03:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411097; 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=NlxuOYXG0QZLBAggloaEXjnjmEZautF9xNRUEEuBF8Y=; b=exo9Rn0Hcwl9HWgK+x+NUhYDRWT2vEkWtJ6iHE7I5zM+SjzRC+m0jSQJUbqpHYOPCJJIMi z8RoYYTl9wqkCbG7yeagId3xm3Gnnxt0E9EUzKbeYLjheRF4LCBia9EEFSg/BXVPHV3BDS PmXZRvPUJSfc2GKj/RuRkKSr3j9HeOU= X-MC-Unique: j12YUoTaNdmngzBtr_AQkA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 06/24] test_driver: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:33 -0500 Message-Id: <20210204035751.164765-7-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 Reviewed-by: Daniel Henrique Barboza --- src/test/test_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 29c4c86b1d..bca1297d1d 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -198,8 +198,8 @@ testDomainDefNamespaceFree(void *data) for (i =3D 0; i < nsdata->num_snap_nodes; i++) xmlFreeNode(nsdata->snap_nodes[i]); =20 - VIR_FREE(nsdata->snap_nodes); - VIR_FREE(nsdata); + g_free(nsdata->snap_nodes); + g_free(nsdata); } =20 static int @@ -428,7 +428,7 @@ static void testDomainObjPrivateFree(void *data) { testDomainObjPrivatePtr priv =3D data; - VIR_FREE(priv); + g_free(priv); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411103; cv=none; d=zohomail.com; s=zohoarc; b=IzkeeTxhYtNz+0fHJQrRjl4sSau3FS+3rEJuAS1aJ8+oo0fdjDEKpX3dItIcPbRCFUGzlCYPtX7hKw+VSuHrbFNUS/Y5whzppGmsd72+xBCHjoFHDJ2Tq1GxoxEnRnQG6AnrObY14UmC/avQPZSraz/OwHOil4c4R3dz6+Y8fOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411103; 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=IDX/I5ZGPwth+OiPT8UqXZh03r7cuZxYlo0kXhj1d1k=; b=NNysCxR6an2/+TOz0nQzyj6SJwG7LUDx9bZ7GbrPX/+Zry6l0h8VO9esd+HKrUnHr8wYHIEpC2BIKhsUr7irmU9lRjirRjp545u4uI6+4h22z0IXOu7z/pfCxw5ELbhVv0iK7fl0WRV8okkhktQJlVxBjq2lGko91RCAHjC0cdg= 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 1612411103401617.1284187752764; Wed, 3 Feb 2021 19:58:23 -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-89-he1NUrl_O42AwRAyk8ojfQ-1; Wed, 03 Feb 2021 22:58:19 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8041B107ACF6; Thu, 4 Feb 2021 03:58:12 +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 5E4F660C5F; Thu, 4 Feb 2021 03:58:12 +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 2AC0C18089CC; Thu, 4 Feb 2021 03:58:12 +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 1143w3vF003373 for ; Wed, 3 Feb 2021 22:58:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 69CC75B697; Thu, 4 Feb 2021 03:58:03 +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 345C95B695 for ; Thu, 4 Feb 2021 03:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411102; 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=IDX/I5ZGPwth+OiPT8UqXZh03r7cuZxYlo0kXhj1d1k=; b=JrMVlWGVBXXH3T4nzQJCzgD9+kw6dtUTN+yMLYWp+PFT8Fh7wHlw7+fZ04j+7vvjuAVjNp qeB0VFJDtdJk494mNUEAbfE8cP+Q2+u15Ey9x9L225mPRrQNHyKlccMZrSGaPCsG+sWHUV BP3ES0AoX5EQDkasFVpbC12rpf84V2U= X-MC-Unique: he1NUrl_O42AwRAyk8ojfQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 07/24] vbox: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:34 -0500 Message-Id: <20210204035751.164765-8-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/vbox/vbox_snapshot_conf.c | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index cb201e777e..f1cae3039a 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -502,14 +502,14 @@ virVboxSnapshotConfHardDiskFree(virVBoxSnapshotConfHa= rdDiskPtr disk) if (!disk) return; =20 - VIR_FREE(disk->uuid); - VIR_FREE(disk->location); - VIR_FREE(disk->format); - VIR_FREE(disk->type); + g_free(disk->uuid); + g_free(disk->location); + g_free(disk->format); + g_free(disk->type); for (i =3D 0; i < disk->nchildren; i++) virVboxSnapshotConfHardDiskFree(disk->children[i]); - VIR_FREE(disk->children); - VIR_FREE(disk); + g_free(disk->children); + g_free(disk); } =20 =20 @@ -523,11 +523,11 @@ virVBoxSnapshotConfMediaRegistryFree(virVBoxSnapshotC= onfMediaRegistryPtr mediaRe =20 for (i =3D 0; i < mediaRegistry->ndisks; i++) virVboxSnapshotConfHardDiskFree(mediaRegistry->disks[i]); - VIR_FREE(mediaRegistry->disks); + g_free(mediaRegistry->disks); for (i =3D 0; i < mediaRegistry->notherMedia; i++) - VIR_FREE(mediaRegistry->otherMedia[i]); - VIR_FREE(mediaRegistry->otherMedia); - VIR_FREE(mediaRegistry); + g_free(mediaRegistry->otherMedia[i]); + g_free(mediaRegistry->otherMedia); + g_free(mediaRegistry); } =20 void @@ -538,16 +538,16 @@ virVBoxSnapshotConfSnapshotFree(virVBoxSnapshotConfSn= apshotPtr snapshot) if (!snapshot) return; =20 - VIR_FREE(snapshot->uuid); - VIR_FREE(snapshot->name); - VIR_FREE(snapshot->timeStamp); - VIR_FREE(snapshot->description); - VIR_FREE(snapshot->hardware); - VIR_FREE(snapshot->storageController); + g_free(snapshot->uuid); + g_free(snapshot->name); + g_free(snapshot->timeStamp); + g_free(snapshot->description); + g_free(snapshot->hardware); + g_free(snapshot->storageController); for (i =3D 0; i < snapshot->nchildren; i++) virVBoxSnapshotConfSnapshotFree(snapshot->children[i]); - VIR_FREE(snapshot->children); - VIR_FREE(snapshot); + g_free(snapshot->children); + g_free(snapshot); } =20 void @@ -556,17 +556,17 @@ virVBoxSnapshotConfMachineFree(virVBoxSnapshotConfMac= hinePtr machine) if (!machine) return; =20 - VIR_FREE(machine->uuid); - VIR_FREE(machine->name); - VIR_FREE(machine->currentSnapshot); - VIR_FREE(machine->snapshotFolder); - VIR_FREE(machine->lastStateChange); + g_free(machine->uuid); + g_free(machine->name); + g_free(machine->currentSnapshot); + g_free(machine->snapshotFolder); + g_free(machine->lastStateChange); virVBoxSnapshotConfMediaRegistryFree(machine->mediaRegistry); - VIR_FREE(machine->hardware); - VIR_FREE(machine->extraData); + g_free(machine->hardware); + g_free(machine->extraData); virVBoxSnapshotConfSnapshotFree(machine->snapshot); - VIR_FREE(machine->storageController); - VIR_FREE(machine); + g_free(machine->storageController); + g_free(machine); } =20 #define VBOX_SETTINGS_NS "http://www.innotek.de/VirtualBox-settings" --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411146; cv=none; d=zohomail.com; s=zohoarc; b=l4z+BgOCJQsYFcQBwjZFcF2m6JM4n16Z19rkIX/MGss5MysGLe4vOOBsHx8a7HGsN1ykWwbOSpbjKHauoCaic+SOZUlp9YYUQa6Y9Yz7e3EBUl6sd8AcoJ6NHonJL/DkR/xCmpkgx4YTLUroZUGikZu5ngD85FungQ7+z7wpD00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411146; 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=TYR64xksZvIsdgUlSiu/1GRsOwBwACmEKIEtcR+vvCM=; b=EFeBmjB3/m8oh9hz6YofuiosndHCBZpPeanVqY9x16XV0GXhsO+HA8y8+Gy24ZqJ8iuTImoWY49aVn3yJ9L9IcyvYK4Y5uPPw8XgkHuJFnASiX3CI8iyRXjtU9k9x3CZmNLA/OvWbiitxp8+LLdsEqCblXqvKOZuPCJEeDMG6Z8= 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 161241114666073.69043527879046; Wed, 3 Feb 2021 19:59:06 -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-175-NyGHSOwZPC6IygZFV47mMQ-1; Wed, 03 Feb 2021 22:58:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F515107ACF3; Thu, 4 Feb 2021 03:58:15 +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 0E2CB60C5F; Thu, 4 Feb 2021 03:58:15 +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 CB98E58078; Thu, 4 Feb 2021 03:58:14 +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 1143w3VW003378 for ; Wed, 3 Feb 2021 22:58:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id BFF5A5B697; Thu, 4 Feb 2021 03:58:03 +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 8B28D5B695 for ; Thu, 4 Feb 2021 03:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411145; 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=TYR64xksZvIsdgUlSiu/1GRsOwBwACmEKIEtcR+vvCM=; b=UMRNAAxMiNotXaey38+qtaqnVHo8By5ey9jjdO9/RJztNPhddIiL+MMebr96/HjzUSnOzO wQhmvBKnEAi8IdIhYRSlcuWYxuu/q1zJpX6LR7I7pNrf7yAVMDFnrjULrBix1hU7qOGe5U NA+B/xz7F4/9hXIi6eFbGiPShJyYL5A= X-MC-Unique: NyGHSOwZPC6IygZFV47mMQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 08/24] vmx: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:35 -0500 Message-Id: <20210204035751.164765-9-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/vmx/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 56318fc8b2..db535ba260 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -650,10 +650,10 @@ virVMXDomainDefNamespaceFree(void *nsdata) struct virVMXDomainDefNamespaceData *data =3D nsdata; =20 if (data) { - VIR_FREE(data->datacenterPath); - VIR_FREE(data->moref); + g_free(data->datacenterPath); + g_free(data->moref); } - VIR_FREE(data); + g_free(data); } =20 static int --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411158; cv=none; d=zohomail.com; s=zohoarc; b=M1VSYS8ZCUb4S8vwZk3BeOb1Yoym6gBPE3MZ8HZUXF1A+8erS5p4aQaxyZEXmVuvPFkLUMzadqAFDNxuTvsDS+K2kmIjhaAuMfln6Zu/Yogy1KN95mwdUJgqrJmX+nvp4Qld8KVDRqpU8EF+sxmYMmLi49hlotVJ2llDhPmqfIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411158; 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=aYb8AApt6oG8ANQG4kQW3OvhY+pFREEx+dVtxCa7KPw=; b=NlMZuFWUmq3OBJK78XObeXMScIc0Ue5BI3Tl1iFnzPzpf0oowC/e50IdRvMala5VwUwgjskVYiQKjdWAyppMqSBznyvHY8bsxSQZ2GXLayFo93zS+Y/WjvO92ugWeLeNBF+Tt4Jym8sCkggrsc3UC1PuIQe140eBjTV9eLULZfg= 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 1612411158605661.5431464357454; Wed, 3 Feb 2021 19:59:18 -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-175-zwBu9DJLP76m9zkuNok9vA-1; Wed, 03 Feb 2021 22:58:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D565C107AD24; Thu, 4 Feb 2021 03:58:14 +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 AAD4960C5F; Thu, 4 Feb 2021 03:58:14 +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 74D2558073; Thu, 4 Feb 2021 03:58:14 +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 1143w4ND003388 for ; Wed, 3 Feb 2021 22:58:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 212375B697; Thu, 4 Feb 2021 03:58:04 +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 E12FD5B695 for ; Thu, 4 Feb 2021 03:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411157; 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=aYb8AApt6oG8ANQG4kQW3OvhY+pFREEx+dVtxCa7KPw=; b=MlDZcM+pILtcy7SFvVDlBQm2YUKrtVli229gS18f66Y0lOLmXdT4HfANV9X9bgsDkW75S3 3KGzQ7i+OmqNEVbzYOapJrYnJsr5cbLi4vmAVi9qe5jAcSB73Z2LGmSPuuHDNtzguv8Py6 v+pfr4VVdVicHptBtPxP9x0TV53U8e8= X-MC-Unique: zwBu9DJLP76m9zkuNok9vA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 09/24] vz: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:36 -0500 Message-Id: <20210204035751.164765-10-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/vz/vz_driver.c | 8 ++++---- src/vz/vz_utils.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index b60e99d4f5..0ebcb06234 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -2729,10 +2729,10 @@ vzMigrationCookieFree(vzMigrationCookiePtr mig) if (!mig) return; =20 - VIR_FREE(mig->session_uuid); - VIR_FREE(mig->uuid); - VIR_FREE(mig->name); - VIR_FREE(mig); + g_free(mig->session_uuid); + g_free(mig->uuid); + g_free(mig->name); + g_free(mig); } =20 static int diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index 4a79b55f3e..e5106619b6 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -582,7 +582,7 @@ vzDomObjFree(void* p) PrlHandle_Free(pdom->sdkdom); PrlHandle_Free(pdom->stats); virCondDestroy(&pdom->job.cond); - VIR_FREE(pdom); + g_free(pdom); }; =20 #define VZ_JOB_WAIT_TIME (1000 * 30) --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411147; cv=none; d=zohomail.com; s=zohoarc; b=KG1vYphGHFbmUpwsjO+Q1FboGdnGXMTMnAdDisHEu8Wh2jQIRtTWFef7HZZvYX2Jvw/qvPP7xvRRR5P1gKXIo+R9ySVzd1uEb0bx5Rs5hnRgFQSP51UhYxvJ1A3VPtKud5OxLdt8XLdVtw35An62+I40RNOdO7I395DiZvPkP+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411147; 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=KQ6TDUSBz+OxTaut468ESkULXJRxPjlEHEbKJ7Z+Pjk=; b=Felb2J075PIIoVeqh3mCfeTGh+ECRyOKK5YOS+Dg95C26pitDkJaR+p1DAe46aBTCefYDC3flvaqo5bh4TY89QUaw8039UTlxthUwjPFyq1BoEvpt2VvHOz0d2sl5DwvUotbUxof1WXFkQREBvpjd3WyVrXJVqr3exCcIuOH9cM= 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 1612411147961402.3940613347544; Wed, 3 Feb 2021 19:59:07 -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-571-qKsg_n6DNLaMq9hSF4-ipw-1; Wed, 03 Feb 2021 22:58:18 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79A82107ACF5; Thu, 4 Feb 2021 03:58:12 +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 4BC5B1A266; Thu, 4 Feb 2021 03:58:12 +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 18DDB18089C9; Thu, 4 Feb 2021 03:58:12 +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 1143w47K003394 for ; Wed, 3 Feb 2021 22:58:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 79CA75B697; Thu, 4 Feb 2021 03:58:04 +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 4567F5B695 for ; Thu, 4 Feb 2021 03:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411147; 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=KQ6TDUSBz+OxTaut468ESkULXJRxPjlEHEbKJ7Z+Pjk=; b=N8+1jIjHQ9JVbOrNwa7F2bISVPi95ZQpG6KuqmjmDWFbNuGHCYAvJUvnMUy26Akw/9HPxE gxcGZ+xslu5ZOl8KZLN9zJSKIKNjHPobffs19I21LWfBK0PlIay61/jRXX5AqKf+67dA9X 1mLMUs7KDaDAc3vH0ys8280L6dYnBjM= X-MC-Unique: qKsg_n6DNLaMq9hSF4-ipw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 10/24] admin: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:37 -0500 Message-Id: <20210204035751.164765-11-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.84 on 10.5.11.23 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 Reviewed-by: Daniel Henrique Barboza --- src/admin/admin_server_dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dis= patch.c index 0efb4485d4..57e8904f4c 100644 --- a/src/admin/admin_server_dispatch.c +++ b/src/admin/admin_server_dispatch.c @@ -57,7 +57,7 @@ remoteAdmClientFree(void *data) =20 virMutexDestroy(&priv->lock); virObjectUnref(priv->dmn); - VIR_FREE(priv); + g_free(priv); } =20 void * --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411151; cv=none; d=zohomail.com; s=zohoarc; b=AxGa0+vVKKMbdktMklBaJ7xL4QyrnOovPguUWljlW6pJ2fICf7BLxtmaixIuVnJotOSrIvnc/tZYeVwe8tujRHmo8sW8JajrKQ/FxbxxJmgVGiI4WgMkc81rIZ/Ccv5KnjCVYe70lXf+TP/CYiXeVuIUs72kPkV9iBwcQEce/lE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411151; 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=3vRHs5S4n0FLsJvKKD2rQ3Fzk+XEvII8lygmdNlyKk0=; b=KS+SE2XPS4mjdMo5TzsUVdKiqZEL39pgKAgS0VZUUvBiX+b5AcsxBuR7AUQDDhNuc8JV6UqghvPip3ff8MmgCfxr4ng/rqI9s/Bo74GOpZDh61SOCeMDxqbcDEKrwPKj97AuW+WuiXrIeFWT/4mcmg4r0JFWE7+91Lar0B5iPwY= 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 1612411151063468.76216563332594; Wed, 3 Feb 2021 19:59:11 -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-196-i9VmnfJtN86qtfmgNb0dBQ-1; Wed, 03 Feb 2021 22:58:20 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 028D58030BF; Thu, 4 Feb 2021 03:58:15 +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 D680D60C6C; Thu, 4 Feb 2021 03:58:14 +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 9FD8C58075; Thu, 4 Feb 2021 03:58:14 +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 1143w48D003403 for ; Wed, 3 Feb 2021 22:58:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id CF4185B698; Thu, 4 Feb 2021 03:58:04 +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 9AC085B697 for ; Thu, 4 Feb 2021 03:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411150; 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=3vRHs5S4n0FLsJvKKD2rQ3Fzk+XEvII8lygmdNlyKk0=; b=Sd7l4504WcSDiwewo66a7tjn70jCrXk5xWBlne+mW6zJZRr+CwMzVGcp5JMVHFukWOZiHm 9KNyIeKtP2rO3THPwz8oX6FBxdYp4hB47jt7kX/zOIBaKA7zF2iayU5RzEkGEKk3qVf3R8 ddNmNcfZnlc/bDxECwGZE9tWErQ1z6A= X-MC-Unique: i9VmnfJtN86qtfmgNb0dBQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 11/24] locking: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:38 -0500 Message-Id: <20210204035751.164765-12-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/locking/lock_daemon.c | 6 +++--- src/locking/lock_daemon_config.c | 6 +++--- src/locking/lock_driver_lockd.c | 10 +++++----- src/locking/lock_driver_sanlock.c | 6 +++--- src/locking/lock_manager.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 851e9fc6f0..94fe374df6 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -92,7 +92,7 @@ virLockDaemonFree(virLockDaemonPtr lockd) virHashFree(lockd->lockspaces); virLockSpaceFree(lockd->defaultLockspace); =20 - VIR_FREE(lockd); + g_free(lockd); } =20 static inline void @@ -435,8 +435,8 @@ virLockDaemonClientFree(void *opaque) } =20 g_mutex_clear(&priv->lock); - VIR_FREE(priv->ownerName); - VIR_FREE(priv); + g_free(priv->ownerName); + g_free(priv); } =20 =20 diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_con= fig.c index 6346703715..f693911997 100644 --- a/src/locking/lock_daemon_config.c +++ b/src/locking/lock_daemon_config.c @@ -71,10 +71,10 @@ virLockDaemonConfigFree(virLockDaemonConfigPtr data) if (!data) return; =20 - VIR_FREE(data->log_filters); - VIR_FREE(data->log_outputs); + g_free(data->log_filters); + g_free(data->log_outputs); =20 - VIR_FREE(data); + g_free(data); } =20 static int diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lock= d.c index 5ebefa48d0..a1deb55788 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -369,13 +369,13 @@ virLockManagerLockDaemonPrivateFree(virLockManagerLoc= kDaemonPrivatePtr priv) return; =20 for (i =3D 0; i < priv->nresources; i++) { - VIR_FREE(priv->resources[i].lockspace); - VIR_FREE(priv->resources[i].name); + g_free(priv->resources[i].lockspace); + g_free(priv->resources[i].name); } - VIR_FREE(priv->resources); + g_free(priv->resources); =20 - VIR_FREE(priv->name); - VIR_FREE(priv); + g_free(priv->name); + g_free(priv); } =20 static void virLockManagerLockDaemonFree(virLockManagerPtr lock) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sa= nlock.c index 7319f56819..aaffe30e6f 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -513,10 +513,10 @@ static void virLockManagerSanlockFree(virLockManagerP= tr lock) if (!priv) return; =20 - VIR_FREE(priv->vm_name); + g_free(priv->vm_name); for (i =3D 0; i < priv->res_count; i++) - VIR_FREE(priv->res_args[i]); - VIR_FREE(priv); + g_free(priv->res_args[i]); + g_free(priv); lock->privateData =3D NULL; } =20 diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c index d83a192bf6..db724eb30f 100644 --- a/src/locking/lock_manager.c +++ b/src/locking/lock_manager.c @@ -387,7 +387,7 @@ int virLockManagerFree(virLockManagerPtr lock) =20 lock->driver->drvFree(lock); =20 - VIR_FREE(lock); + g_free(lock); =20 return 0; } --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411173; cv=none; d=zohomail.com; s=zohoarc; b=haIe/DoyaOAHoi/A0wbZqZqjKBHYxKmeC/3UnIxC8PRubikXW2PXg+22hkqTeLP9NOGtH0FB6R9k9ZAr75GoB16ESCwwtsvtq+xJmCYq7PLdaW5b/Cx1bkH/oEKR+6ujgQvCrKxDr47QVgyBONLbKVmworMdpoCoNLVdhI4zaJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411173; 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=05FTOLDKbiaGmVGFYJ+UUM5Ytx+Y3h1a6Qdr8OaJKjE=; b=lNLIEXhrq481mLOZ5y+0NSpaio2dmw+HayyAuzKPB4L5vd+sLoIgH5SO7Wpi/YqA+dTpzff+zQHivXXuZ6IZgyk3u7cvKMAUd9ZDhPEdo8QcfzD0Hs+foX7QYSMa0qkIbBswuZ2k1y6fZEhBTedS1gIUqN9iLcRSTrg9JE5H7X8= 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 1612411173269569.8998645789942; Wed, 3 Feb 2021 19:59: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-20-hOOZFv6aOgmoHl8qsXKxlA-1; Wed, 03 Feb 2021 22:58:23 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 015C18030BC; Thu, 4 Feb 2021 03:58:18 +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 D3F1360C13; Thu, 4 Feb 2021 03:58:17 +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 9F3E118077A0; Thu, 4 Feb 2021 03:58:17 +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 1143w59J003411 for ; Wed, 3 Feb 2021 22:58:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 31E275B698; Thu, 4 Feb 2021 03:58:05 +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 F0ED95B695 for ; Thu, 4 Feb 2021 03:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411172; 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=05FTOLDKbiaGmVGFYJ+UUM5Ytx+Y3h1a6Qdr8OaJKjE=; b=eSGNOyvZ5GCfAzI52UWiSVXL4vKw8/R/0CgBHMQEH481Yp8/H1BvgO9YoPBfuDG1LmwnDL 7R2TGYbTkDaU5OYZNwdtcpiBoI5PFnpd/WbFVobVhUvor0sO3JLr1PjaIMQbo2wEZ/5q62 OX33eMfsEus7gWEoU/6+AcAGfVC2mZs= X-MC-Unique: hOOZFv6aOgmoHl8qsXKxlA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 12/24] logging: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:39 -0500 Message-Id: <20210204035751.164765-13-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/logging/log_daemon.c | 4 ++-- src/logging/log_daemon_config.c | 6 +++--- src/logging/log_handler.c | 6 +++--- src/logging/log_manager.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index 6b8f3b6fe5..770f6dd273 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -89,7 +89,7 @@ virLogDaemonFree(virLogDaemonPtr logd) g_mutex_clear(&logd->lock); virObjectUnref(logd->dmn); =20 - VIR_FREE(logd); + g_free(logd); } =20 =20 @@ -314,7 +314,7 @@ virLogDaemonClientFree(void *opaque) (unsigned long long)priv->clientPid); =20 g_mutex_clear(&priv->lock); - VIR_FREE(priv); + g_free(priv); } =20 =20 diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_confi= g.c index 5577991b13..075cf766ec 100644 --- a/src/logging/log_daemon_config.c +++ b/src/logging/log_daemon_config.c @@ -74,10 +74,10 @@ virLogDaemonConfigFree(virLogDaemonConfigPtr data) if (!data) return; =20 - VIR_FREE(data->log_filters); - VIR_FREE(data->log_outputs); + g_free(data->log_filters); + g_free(data->log_outputs); =20 - VIR_FREE(data); + g_free(data); } =20 static int diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index 95d909b44e..45a4763525 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -98,9 +98,9 @@ virLogHandlerLogFileFree(virLogHandlerLogFilePtr file) if (file->watch !=3D -1) virEventRemoveHandle(file->watch); =20 - VIR_FREE(file->driver); - VIR_FREE(file->domname); - VIR_FREE(file); + g_free(file->driver); + g_free(file->domname); + g_free(file); } =20 =20 diff --git a/src/logging/log_manager.c b/src/logging/log_manager.c index 57be340a2d..56927c1d6d 100644 --- a/src/logging/log_manager.c +++ b/src/logging/log_manager.c @@ -137,7 +137,7 @@ virLogManagerFree(virLogManagerPtr mgr) virObjectUnref(mgr->program); virObjectUnref(mgr->client); =20 - VIR_FREE(mgr); + g_free(mgr); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411264; cv=none; d=zohomail.com; s=zohoarc; b=lknbo8rwm9jSCiCNpc2j5P3VE6QY+W6VausjP2gHRLz47G3jCcVsRHT7L6eAlBsl/G0JtfPYekat9ziIBqeSST2wHV/OQouUjZzvRnusRqU4S+Ev4jA7YbJy2A85BFOuOLJjzveM2x9MNd2DK/51m3PhMyV8lvZLu3tVXZRsQDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411264; 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=9nvSb5RmbeVsybJUHfYWcnnKmOcOlE8bBBdgHpl12P0=; b=AjMV6JHXxvonw26X0knBWCFvumhv0dAMc5cZ470aSq68+OCARl6Clxa6c2aINMQPQypOlCqK7ffHfJhY64fBHRYwrxrURfRjy0hCyIch5WfYyvqid3iKOfY8umftDa3QQ6bvBAr/1F8NnTjPVk8WsvlQv6NmoV7iz9sSxD8uKQM= 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 1612411264053929.5688676034949; Wed, 3 Feb 2021 20:01:04 -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-20-BHmLRdArOeCeob8zLrVv3w-1; Wed, 03 Feb 2021 22:58:23 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCB0B107ACF4; Thu, 4 Feb 2021 03:58:17 +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 A52325B6AA; Thu, 4 Feb 2021 03:58:17 +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 6E2D618089E0; Thu, 4 Feb 2021 03:58:17 +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 1143w5NG003421 for ; Wed, 3 Feb 2021 22:58:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 891735B698; Thu, 4 Feb 2021 03:58:05 +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 53A0B5B695 for ; Thu, 4 Feb 2021 03:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411263; 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=9nvSb5RmbeVsybJUHfYWcnnKmOcOlE8bBBdgHpl12P0=; b=PvMhHZf2gx/9pvsJelF+eTpI2wWq0+ps7c6hxlClveX67qS5BDxALkPioRWx+kvUAHH0X8 QCTImjjVZfgRCfJsrufTxPW+KT7VResivEcIH5re41vauWBQyeJi0hlJ8g22L0m7tUmFJn 1q3kofG9ugOuJXIrwJ9SsPAKiUUH53s= X-MC-Unique: BHmLRdArOeCeob8zLrVv3w-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 13/24] remote: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:40 -0500 Message-Id: <20210204035751.164765-14-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.15 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 Reviewed-by: Daniel Henrique Barboza --- src/remote/remote_daemon_config.c | 48 ++++++++++++++--------------- src/remote/remote_daemon_dispatch.c | 4 +-- src/remote/remote_driver.c | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_c= onfig.c index f0cca42925..b354dc4cc0 100644 --- a/src/remote/remote_daemon_config.c +++ b/src/remote/remote_daemon_config.c @@ -173,53 +173,53 @@ daemonConfigFree(struct daemonConfig *data) return; =20 #ifdef WITH_IP - VIR_FREE(data->listen_addr); - VIR_FREE(data->tls_port); - VIR_FREE(data->tcp_port); + g_free(data->listen_addr); + g_free(data->tls_port); + g_free(data->tcp_port); #endif /* ! WITH_IP */ =20 tmp =3D data->access_drivers; while (tmp && *tmp) { - VIR_FREE(*tmp); + g_free(*tmp); tmp++; } - VIR_FREE(data->access_drivers); + g_free(data->access_drivers); =20 - VIR_FREE(data->unix_sock_admin_perms); - VIR_FREE(data->unix_sock_ro_perms); - VIR_FREE(data->unix_sock_rw_perms); - VIR_FREE(data->unix_sock_group); - VIR_FREE(data->unix_sock_dir); + g_free(data->unix_sock_admin_perms); + g_free(data->unix_sock_ro_perms); + g_free(data->unix_sock_rw_perms); + g_free(data->unix_sock_group); + g_free(data->unix_sock_dir); =20 tmp =3D data->sasl_allowed_username_list; while (tmp && *tmp) { - VIR_FREE(*tmp); + g_free(*tmp); tmp++; } - VIR_FREE(data->sasl_allowed_username_list); + g_free(data->sasl_allowed_username_list); =20 #ifdef WITH_IP tmp =3D data->tls_allowed_dn_list; while (tmp && *tmp) { - VIR_FREE(*tmp); + g_free(*tmp); tmp++; } - VIR_FREE(data->tls_allowed_dn_list); + g_free(data->tls_allowed_dn_list); =20 - VIR_FREE(data->tls_priority); + g_free(data->tls_priority); =20 - VIR_FREE(data->key_file); - VIR_FREE(data->ca_file); - VIR_FREE(data->cert_file); - VIR_FREE(data->crl_file); + g_free(data->key_file); + g_free(data->ca_file); + g_free(data->cert_file); + g_free(data->crl_file); #endif /* ! WITH_IP */ =20 - VIR_FREE(data->host_uuid); - VIR_FREE(data->host_uuid_source); - VIR_FREE(data->log_filters); - VIR_FREE(data->log_outputs); + g_free(data->host_uuid); + g_free(data->host_uuid_source); + g_free(data->log_filters); + g_free(data->log_outputs); =20 - VIR_FREE(data); + g_free(data); } =20 static int diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 46683aa4a7..b7ef1f4b26 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -150,7 +150,7 @@ remoteEventCallbackFree(void *opaque) return; virObjectUnref(callback->program); virObjectUnref(callback->client); - VIR_FREE(callback); + g_free(callback); } =20 =20 @@ -1742,7 +1742,7 @@ void remoteClientFree(void *data) if (priv->storageConn) virConnectClose(priv->storageConn); =20 - VIR_FREE(priv); + g_free(priv); } =20 =20 diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 1b784e61c7..8d6790ccf2 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -5614,7 +5614,7 @@ static void remoteStreamCallbackFree(void *opaque) (cbdata->ff)(cbdata->opaque); =20 virObjectUnref(cbdata->st); - VIR_FREE(opaque); + g_free(opaque); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411210; cv=none; d=zohomail.com; s=zohoarc; b=IPrE31Lx9sp9Nt3S6fAtAaCeXXoj9wt4ILEQ8b4GKIq8dJEw+8FQBcNrxNtQSZju53NmCprF1CP3DDhdVCuqAGI3qtRpkMnYOMKIeP/jyt64yLwmOzVm83y/sM9gpHMZFSfQFeHXkakZoFbnEoqixzpoAzcUTqkWBn4lQ6Dhxb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411210; 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=zDJ6o6/V4eQWrxvlbHW2LD1xCFNdDYX/RKVKGZafjlQ=; b=TzSPia9xmtiXK9Purwo29g1daBF2HKhTVCQ1V9S73Xf1y6tzP/FB9XiXrmYBrj6nwYGNMXHXQVOeMjrGbXtnhVaOhkU410FqagfqfHAsAAQv3Tp21bnGKu9ni1SvrSAftLMs8sKGlWhxYAcmdbVFW5YpiYIkso0/qjZvQer69LM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411210560454.5770086919372; Wed, 3 Feb 2021 20:00:10 -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-247-rLMb8TWoMh-09JXQcjPL7A-1; Wed, 03 Feb 2021 22:58:24 -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 B036710066FC; Thu, 4 Feb 2021 03:58:17 +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 884DE5D9F4; Thu, 4 Feb 2021 03:58:17 +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 5413218089D9; Thu, 4 Feb 2021 03:58:17 +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 1143w5Ia003431 for ; Wed, 3 Feb 2021 22:58:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id E09DB5B697; Thu, 4 Feb 2021 03:58:05 +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 A9F2A5B695 for ; Thu, 4 Feb 2021 03:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411209; 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=zDJ6o6/V4eQWrxvlbHW2LD1xCFNdDYX/RKVKGZafjlQ=; b=Ug/C/SCW9VEqGLB6xz97iEuk8l8V1gb9exqQmQwseAdy42jPD+8fI23cjZZKJmX3Yzi4u4 m0rDjV+vW03i7CO1KGFWw7eQi1ULFZLW/Vmf9WBuoqy62dfyCZweyVI03/m4cPFXV+2SFl uqgJLjnz4Qe5ClJsuXl99Ok301cw7hA= X-MC-Unique: rLMb8TWoMh-09JXQcjPL7A-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 14/24] rpc: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:41 -0500 Message-Id: <20210204035751.164765-15-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 Reviewed-by: Daniel Henrique Barboza --- src/rpc/virnetmessage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c index b728e73f4f..9f7334ae4c 100644 --- a/src/rpc/virnetmessage.c +++ b/src/rpc/virnetmessage.c @@ -88,7 +88,7 @@ void virNetMessageFree(virNetMessagePtr msg) msg->cb(msg, msg->opaque); =20 virNetMessageClearPayload(msg); - VIR_FREE(msg); + g_free(msg); } =20 void virNetMessageQueuePush(virNetMessagePtr *queue, virNetMessagePtr msg) --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411212; cv=none; d=zohomail.com; s=zohoarc; b=LYVh+uiDRVGUSmArUloxEdXVJKkWLAszWLsXhEk/VglHxv2SNY2keqVAKHnXzvXeFQbg7CQWN7Lj5QXqPqCuuQNOPswRzYy+SIoIk/U/jjO9r6aTKIEKDdgaZj8hoaPUfhHgGHaGLxQ/5KVtttWEORNK4fbRuY39lhy9s7uPCMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411212; 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=DPKz/x7qODw8r2ictuJeQb4cfD8V5EAOLdFL20gmml4=; b=CkplOW0GeTRkxjW4aIrSIvbttMBL0PjmA7DPBUTw2GbOo5gjvKAFFdpX3cJkGdZl/t4B+WzmEz0CLnGGaqaRKRpc1DkcUwmgX2qX9tCv6g4BCOWB7pHMK48QhFv7jwXxEWnX9w07aEozy+JslqAxUDFBndUJTDdsyAifMUidT1g= 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 1612411212671290.9995489855105; Wed, 3 Feb 2021 20:00:12 -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-391-oY6ey5okORa5hcBCbqOmHw-1; Wed, 03 Feb 2021 22:58:26 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC1A6C2AE; Thu, 4 Feb 2021 03:58:20 +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 8B13560C72; Thu, 4 Feb 2021 03:58:20 +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 5740258085; Thu, 4 Feb 2021 03:58:20 +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 1143w6Ek003441 for ; Wed, 3 Feb 2021 22:58:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 418545B697; 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 0C3425B695 for ; Thu, 4 Feb 2021 03:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411211; 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=DPKz/x7qODw8r2ictuJeQb4cfD8V5EAOLdFL20gmml4=; b=gP/86c8Y+jPX5kbpQu7AGJjfLfUShUZ98ebFL4Jzr7xBjR2dnnM842Npb9gClMITARP759 deG37bJ2S5n+i5blWn28q7Rooc3Nnfj0Dh67SksLdbZx1WxgjfIb8zA2AwB8tCZEQFe2Ih 4imOo5dOX+5wI6brX5QbPQYPaIZBq4M= X-MC-Unique: oY6ey5okORa5hcBCbqOmHw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 15/24] security: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:42 -0500 Message-Id: <20210204035751.164765-16-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.12 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 Reviewed-by: Daniel Henrique Barboza --- src/security/security_dac.c | 8 ++++---- src/security/security_selinux.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 389d1dac51..00eeae0d27 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -141,12 +141,12 @@ virSecurityDACChownListFree(void *opaque) return; =20 for (i =3D 0; i < list->nItems; i++) { - VIR_FREE(list->items[i]->path); - VIR_FREE(list->items[i]); + g_free(list->items[i]->path); + g_free(list->items[i]); } - VIR_FREE(list->items); + g_free(list->items); virObjectUnref(list->manager); - VIR_FREE(list); + g_free(list); } =20 =20 diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 8cc30a0e72..1d1d9edfff 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -108,9 +108,9 @@ virSecuritySELinuxContextItemFree(virSecuritySELinuxCon= textItemPtr item) if (!item) return; =20 - VIR_FREE(item->path); - VIR_FREE(item->tcon); - VIR_FREE(item); + g_free(item->path); + g_free(item->tcon); + g_free(item); } =20 static int @@ -152,9 +152,9 @@ virSecuritySELinuxContextListFree(void *opaque) for (i =3D 0; i < list->nItems; i++) virSecuritySELinuxContextItemFree(list->items[i]); =20 - VIR_FREE(list->items); + g_free(list->items); virObjectUnref(list->manager); - VIR_FREE(list); + g_free(list); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411110; cv=none; d=zohomail.com; s=zohoarc; b=JBywO/D14OpV2DwLQTh04blW14dh54kgLbo3LnYgHTnlS96iZsaW3X6ISMTVrwo/ZwZXAofCfwvs69Hhf4zJxcq4vogYAD+77r+xz8fx6Xlj1QPp3GXXYE4UgAqJlpvWiWf3gOZxLF7JfitCC/QAb1R8C0Vh//Gyl0Eer53ZrW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411110; 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=WcZHXge8zlcExK5SQEe87jcEE+ZaJfNFu5Diqxk+6ec=; b=VMoYDXGXNsj7no8KHaWEkM6OKR3Wi/apYMK+HulskzsUsKm8WnGB7+q/HSxNIzwp96z6ajezDjxQFp1hL5ywzuwifOw65sl4mEAjZTOKaW0ra0/orqZjmp6GQw7Ih+FdW1ebOUR7TPWnh/9rOM61P5GMr5R0TMq3N43hWT/++FQ= 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 161241111065835.19913765139995; Wed, 3 Feb 2021 19:58:30 -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-163-a-7ESeq-OzGyglOX8CzDEg-1; Wed, 03 Feb 2021 22:58:26 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E29E801978; Thu, 4 Feb 2021 03:58:20 +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 39DE25B697; Thu, 4 Feb 2021 03:58:20 +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 0169C5807F; Thu, 4 Feb 2021 03:58:20 +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 1143w678003450 for ; Wed, 3 Feb 2021 22:58:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 96E585B697; 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 61A595B695 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=1612411109; 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=WcZHXge8zlcExK5SQEe87jcEE+ZaJfNFu5Diqxk+6ec=; b=DFsUG/dS0KEll/YfkwMLmPoRvwGDefWLH6okL/d70+jORyoDkdIpw7XbXI/BuAg5l+9m31 FDU/m4bqtLi+rvx50s7P7VG1gVcE1F3mQyRuMU+MzwfizxydY9kmDhe7KP9ZAu1EUCei5u kIah/zl7EV0GsEmBIwIIqpSYzl8O1vw= X-MC-Unique: a-7ESeq-OzGyglOX8CzDEg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 16/24] tools: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:43 -0500 Message-Id: <20210204035751.164765-17-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.15 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 Reviewed-by: Daniel Henrique Barboza --- tools/virsh-checkpoint.c | 6 +++--- tools/virsh-domain-monitor.c | 4 ++-- tools/virsh-domain.c | 2 +- tools/virsh-interface.c | 4 ++-- tools/virsh-network.c | 8 ++++---- tools/virsh-nodedev.c | 4 ++-- tools/virsh-nwfilter.c | 8 ++++---- tools/virsh-pool.c | 4 ++-- tools/virsh-secret.c | 4 ++-- tools/virsh-snapshot.c | 6 +++--- tools/virsh-volume.c | 4 ++-- tools/vsh-table.c | 10 +++++----- tools/vsh.c | 6 +++--- 13 files changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index f6396d16eb..6e68ba66ff 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -552,11 +552,11 @@ virshCheckpointListFree(virshCheckpointListPtr checkp= ointlist) if (checkpointlist->chks) { for (i =3D 0; i < checkpointlist->nchks; i++) { virshDomainCheckpointFree(checkpointlist->chks[i].chk); - VIR_FREE(checkpointlist->chks[i].parent); + g_free(checkpointlist->chks[i].parent); } - VIR_FREE(checkpointlist->chks); + g_free(checkpointlist->chks); } - VIR_FREE(checkpointlist); + g_free(checkpointlist); } =20 =20 diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 5d0a03afa9..02ff1fbd62 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -1609,9 +1609,9 @@ virshDomainListFree(virshDomainListPtr domlist) if (domlist && domlist->domains) { for (i =3D 0; i < domlist->ndomains; i++) virshDomainFree(domlist->domains[i]); - VIR_FREE(domlist->domains); + g_free(domlist->domains); } - VIR_FREE(domlist); + g_free(domlist); } =20 static virshDomainListPtr diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index fb8b4bdb72..98a87dd43c 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -1796,7 +1796,7 @@ virshBlockJobWaitFree(virshBlockJobWaitDataPtr data) if (data->cb_id2 >=3D 0) virConnectDomainEventDeregisterAny(priv->conn, data->cb_id2); =20 - VIR_FREE(data); + g_free(data); } =20 =20 diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 858052d341..a11d4ba607 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -176,9 +176,9 @@ virshInterfaceListFree(virshInterfaceListPtr list) if (list->ifaces[i]) virInterfaceFree(list->ifaces[i]); } - VIR_FREE(list->ifaces); + g_free(list->ifaces); } - VIR_FREE(list); + g_free(list); } =20 static virshInterfaceListPtr diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 9e3b31a60c..a203fa64ff 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -459,9 +459,9 @@ virshNetworkListFree(virshNetworkListPtr list) if (list->nets[i]) virNetworkFree(list->nets[i]); } - VIR_FREE(list->nets); + g_free(list->nets); } - VIR_FREE(list); + g_free(list); } =20 static virshNetworkListPtr @@ -1676,9 +1676,9 @@ virshNetworkPortListFree(virshNetworkPortListPtr list) if (list->ports[i]) virNetworkPortFree(list->ports[i]); } - VIR_FREE(list->ports); + g_free(list->ports); } - VIR_FREE(list); + g_free(list); } =20 static virshNetworkPortListPtr diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 69422e20f5..fedc8497f8 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -205,9 +205,9 @@ virshNodeDeviceListFree(virshNodeDeviceListPtr list) if (list->devices[i]) virNodeDeviceFree(list->devices[i]); } - VIR_FREE(list->devices); + g_free(list->devices); } - VIR_FREE(list); + g_free(list); } =20 static virshNodeDeviceListPtr diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c index 768a96e949..0d09a016bc 100644 --- a/tools/virsh-nwfilter.c +++ b/tools/virsh-nwfilter.c @@ -234,9 +234,9 @@ virshNWFilterListFree(virshNWFilterListPtr list) if (list->filters[i]) virNWFilterFree(list->filters[i]); } - VIR_FREE(list->filters); + g_free(list->filters); } - VIR_FREE(list); + g_free(list); } =20 static virshNWFilterListPtr @@ -654,9 +654,9 @@ virshNWFilterBindingListFree(virshNWFilterBindingListPt= r list) if (list->bindings[i]) virNWFilterBindingFree(list->bindings[i]); } - VIR_FREE(list->bindings); + g_free(list->bindings); } - VIR_FREE(list); + g_free(list); } =20 =20 diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 7835fa6d75..5256b50589 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -850,9 +850,9 @@ virshStoragePoolListFree(virshStoragePoolListPtr list) if (list->pools[i]) virStoragePoolFree(list->pools[i]); } - VIR_FREE(list->pools); + g_free(list->pools); } - VIR_FREE(list); + g_free(list); } =20 static virshStoragePoolListPtr diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index fcfbe5fe9e..7ca3e864da 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -410,9 +410,9 @@ virshSecretListFree(virshSecretListPtr list) for (i =3D 0; i < list->nsecrets; i++) virshSecretFree(list->secrets[i]); =20 - VIR_FREE(list->secrets); + g_free(list->secrets); } - VIR_FREE(list); + g_free(list); } =20 static virshSecretListPtr diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 478657b5b6..1b10ef37e3 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1032,11 +1032,11 @@ virshSnapshotListFree(virshSnapshotListPtr snaplist) if (snaplist->snaps) { for (i =3D 0; i < snaplist->nsnaps; i++) { virshDomainSnapshotFree(snaplist->snaps[i].snap); - VIR_FREE(snaplist->snaps[i].parent); + g_free(snaplist->snaps[i].parent); } - VIR_FREE(snaplist->snaps); + g_free(snaplist->snaps); } - VIR_FREE(snaplist); + g_free(snaplist); } =20 static int diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index c86abb863f..af2d1d42a3 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -1273,9 +1273,9 @@ virshStorageVolListFree(virshStorageVolListPtr list) if (list->vols[i]) virStorageVolFree(list->vols[i]); } - VIR_FREE(list->vols); + g_free(list->vols); } - VIR_FREE(list); + g_free(list); } =20 static virshStorageVolListPtr diff --git a/tools/vsh-table.c b/tools/vsh-table.c index 4471368687..d09cc9e14e 100644 --- a/tools/vsh-table.c +++ b/tools/vsh-table.c @@ -52,10 +52,10 @@ vshTableRowFree(vshTableRowPtr row) return; =20 for (i =3D 0; i < row->ncells; i++) - VIR_FREE(row->cells[i]); + g_free(row->cells[i]); =20 - VIR_FREE(row->cells); - VIR_FREE(row); + g_free(row->cells); + g_free(row); } =20 =20 @@ -69,8 +69,8 @@ vshTableFree(vshTablePtr table) =20 for (i =3D 0; i < table->nrows; i++) vshTableRowFree(table->rows[i]); - VIR_FREE(table->rows); - VIR_FREE(table); + g_free(table->rows); + g_free(table); } =20 =20 diff --git a/tools/vsh.c b/tools/vsh.c index 0e2d4955b4..202bd564f7 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -719,8 +719,8 @@ vshCommandOptFree(vshCmdOpt * arg) =20 a =3D a->next; =20 - VIR_FREE(tmp->data); - VIR_FREE(tmp); + g_free(tmp->data); + g_free(tmp); } } =20 @@ -735,7 +735,7 @@ vshCommandFree(vshCmd *cmd) c =3D c->next; =20 vshCommandOptFree(tmp->opts); - VIR_FREE(tmp); + g_free(tmp); } } =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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 Reviewed-by: Daniel Henrique Barboza --- 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 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411108; cv=none; d=zohomail.com; s=zohoarc; b=Jj4lcT/4bUEFOatRwUmI7zm7p8gBT+TBOjG7M94cfoz1vorErBOOEN+xKoHcH1Ui2yS4sC0+Qp8cKlYwhS7U9ECr2QfiCuhxaygBdojQ8XBAVKbvXv65L3SZCci6p19RB+UycndwzENNoMkzFIGusIeb16TgHJJ5Qby+irLiMlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411108; 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=P0lBG9ygp+dK9QwHaX4A7my1sBIYt6oDrLN+bCRD/eU=; b=VNlnCnzuJb7w2wPU5RLzC9JfsE3zO5L6ZGuWAG+BpcIRS48vkIb3XOTiJr0UmbcmmhWnKTI9YF/1NnqPjvtpyQadkp5cFIgpU3mTU45lVvQz5bNzfCdUDAyCk6KvOOA9yfbYm2iQJA8bePhCN4G0CZeeHVKdGZ2QI6nEPO/QC2I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411108794973.5322278603068; Wed, 3 Feb 2021 19:58:28 -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-520-s-85ztmVPmyZE-dFqm12Tg-1; Wed, 03 Feb 2021 22:58:25 -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 7E93B100728F; Thu, 4 Feb 2021 03:58:20 +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 5B25C101E66C; Thu, 4 Feb 2021 03:58:20 +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 23C0858080; Thu, 4 Feb 2021 03:58:20 +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 1143w7QU003466 for ; Wed, 3 Feb 2021 22:58:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4FB075B697; Thu, 4 Feb 2021 03:58:07 +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 1B1615B695 for ; Thu, 4 Feb 2021 03:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411107; 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=P0lBG9ygp+dK9QwHaX4A7my1sBIYt6oDrLN+bCRD/eU=; b=CHYbEUjZ7ZL3nqC1q7yktg5Bi+5AIzXaBB8eu8TlRzL7mGV5meQHEafG4/tS/V99sJX0zU 5thp61z4KpXPtjiHNxVk/KBS+VzWJfgcd0orO4u+HErbS+Gz7DgvsL8cbue3rzFDvBVR/1 iFgOIQwGXovi6xTMQOdhhgkey3jyeeI= X-MC-Unique: s-85ztmVPmyZE-dFqm12Tg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 18/24] storage: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:45 -0500 Message-Id: <20210204035751.164765-19-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.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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/storage/storage_backend_fs.c | 6 +++--- src/storage/storage_backend_rbd.c | 10 +++++----- src/storage/storage_backend_scsi.c | 4 ++-- src/storage/storage_driver.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend= _fs.c index b98d06c644..48924167eb 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -551,10 +551,10 @@ virStoragePoolDefFSNamespaceFree(void *nsdata) return; =20 for (i =3D 0; i < cmdopts->noptions; i++) - VIR_FREE(cmdopts->options[i]); - VIR_FREE(cmdopts->options); + g_free(cmdopts->options[i]); + g_free(cmdopts->options); =20 - VIR_FREE(cmdopts); + g_free(cmdopts); } =20 =20 diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index 007c53f7ac..2804759557 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -68,13 +68,13 @@ virStoragePoolDefRBDNamespaceFree(void *nsdata) return; =20 for (i =3D 0; i < cmdopts->noptions; i++) { - VIR_FREE(cmdopts->names[i]); - VIR_FREE(cmdopts->values[i]); + g_free(cmdopts->names[i]); + g_free(cmdopts->values[i]); } - VIR_FREE(cmdopts->names); - VIR_FREE(cmdopts->values); + g_free(cmdopts->names); + g_free(cmdopts->values); =20 - VIR_FREE(cmdopts); + g_free(cmdopts); } =20 =20 diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backe= nd_scsi.c index 69a01d1a24..9474c60c72 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -95,8 +95,8 @@ virStoragePoolFCRefreshDataFree(void *opaque) { virStoragePoolFCRefreshInfoPtr cbdata =3D opaque; =20 - VIR_FREE(cbdata->fchost_name); - VIR_FREE(cbdata); + g_free(cbdata->fchost_name); + g_free(cbdata); } =20 /** diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 16bc53aa46..9c5be071df 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2268,8 +2268,8 @@ virStorageVolPoolRefreshDataFree(void *opaque) { virStorageVolStreamInfoPtr cbdata =3D opaque; =20 - VIR_FREE(cbdata->pool_name); - VIR_FREE(cbdata); + g_free(cbdata->pool_name); + g_free(cbdata); } =20 static int --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411111; cv=none; d=zohomail.com; s=zohoarc; b=JNe8kI5/Hi1CcytEfgw3SiJsOZyJlz/wjlvdHh68WAMTM0Ce1Pw42N1Dked8KxKy34mUoymTGPSTpQmC81jUyQHRfkOQHY5t47wBsEilfrubRDhOkt9k06a8YN90jXiX+NI5aEqfyhThWjCt9l1Gyrhg76VPjYIlCoLRZtpCbmo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411111; 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=BV8fCj/b0YobysTRcWZ/5rXqCFooOY5wJBBHc+U0MGQ=; b=hSKa7ymU8eirm5wcZUTNeePDp4BSo7RibflqVWxvQmLk6Gvg1LPoR2B6/aC9bFj+83VYVuRAxlctLRz5on6E1bhKH57az6hs79QGZGshC/AjIL+d/mI2ZvGRG/O3t0PKcfQnUGYdsMWurptSSJcKTrn4CJeaJAI4JoVdAXkGIa0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411111806914.7994087137726; Wed, 3 Feb 2021 19:58:31 -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-570-8L4BIGN8MOGHPwJIqHEkXg-1; Wed, 03 Feb 2021 22:58:28 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 194B0C2A8; Thu, 4 Feb 2021 03:58:23 +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 E94235B697; Thu, 4 Feb 2021 03:58:22 +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 B557018095CB; Thu, 4 Feb 2021 03:58:22 +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 1143w75O003473 for ; Wed, 3 Feb 2021 22:58:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id A73BB5B695; Thu, 4 Feb 2021 03:58:07 +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 7155D5B697 for ; Thu, 4 Feb 2021 03:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411110; 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=BV8fCj/b0YobysTRcWZ/5rXqCFooOY5wJBBHc+U0MGQ=; b=Gl+i1PPyVkXg4bKqaSv3J/KwuSypBFWLS9uCQgoF6GOIocG5HGUfOk2NQVmQDUWfuuWj6V JyhzEDibB+AnizPvtvc+8GV4zY7xeu0rCZFYnmQmhMWVttnPjDIsY5TAJMDKB9p8FqD5Up S56dIocqAVjaGDxxNtTNJPu6YvonPGw= X-MC-Unique: 8L4BIGN8MOGHPwJIqHEkXg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 19/24] libvirtd: replace straggler VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:57:46 -0500 Message-Id: <20210204035751.164765-20-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.15 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 Reviewed-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 18 +++++++++--------- src/libvirt-network.c | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index c9f8ffdb56..dba89a7d3a 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -7789,8 +7789,8 @@ virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr in= fo) if (!info) return; =20 - VIR_FREE(info->cpumap); - VIR_FREE(info); + g_free(info->cpumap); + g_free(info); } =20 =20 @@ -12084,10 +12084,10 @@ virDomainStatsRecordListFree(virDomainStatsRecord= Ptr *stats) for (next =3D stats; *next; next++) { virTypedParamsFree((*next)->params, (*next)->nparams); virDomainFree((*next)->dom); - VIR_FREE(*next); + g_free(*next); } =20 - VIR_FREE(stats); + g_free(stats); } =20 =20 @@ -12281,14 +12281,14 @@ virDomainInterfaceFree(virDomainInterfacePtr ifac= e) if (!iface) return; =20 - VIR_FREE(iface->name); - VIR_FREE(iface->hwaddr); + g_free(iface->name); + g_free(iface->hwaddr); =20 for (i =3D 0; i < iface->naddrs; i++) - VIR_FREE(iface->addrs[i].addr); - VIR_FREE(iface->addrs); + g_free(iface->addrs[i].addr); + g_free(iface->addrs); =20 - VIR_FREE(iface); + g_free(iface); } =20 =20 diff --git a/src/libvirt-network.c b/src/libvirt-network.c index f691b672c7..92bdbacbff 100644 --- a/src/libvirt-network.c +++ b/src/libvirt-network.c @@ -1240,13 +1240,13 @@ virNetworkDHCPLeaseFree(virNetworkDHCPLeasePtr leas= e) { if (!lease) return; - VIR_FREE(lease->iface); - VIR_FREE(lease->mac); - VIR_FREE(lease->iaid); - VIR_FREE(lease->ipaddr); - VIR_FREE(lease->hostname); - VIR_FREE(lease->clientid); - VIR_FREE(lease); + g_free(lease->iface); + g_free(lease->mac); + g_free(lease->iaid); + g_free(lease->ipaddr); + g_free(lease->hostname); + g_free(lease->clientid); + g_free(lease); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411114; cv=none; d=zohomail.com; s=zohoarc; b=HA+8mQZBUU0VTWgE6e0WOgFStUKj42TQldGcQWsgeGufLZQeX6udxizmXPCrcMfQzBDzQagQPR0GzRV2EzRQxe5y2Nn85Y6N8by0eD969oEp/MzAcws2W/AzDUDPYALEhfS5W3UKE/ynxbRIrNT7wBEkmE+8AvwrQjvmIBCmOQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411114; 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=Rp8UQqZKvc9Jx3ZMczrqWZE1qvx47xeKTzcXGkjJ5wQ=; b=ejSokYDQYVQYyipIuiesWHew17K7s2MreapWYh/MJ2CG2S0DiCbgsPH1M3jQhhI0vrwgWOWGhJzQsyRA11Vh/YQJ5/3h3Hg+ajdTEtMf238MA0BDJOagv7MCIK2iw966XFWEEpzU+JYAZV68VR9ctto14KJrZ0ZVAmZMClDJDL0= 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 1612411114986594.1494151495785; Wed, 3 Feb 2021 19:58:34 -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-343-ji2yCgKrMxSGpn1qb6XiRA-1; Wed, 03 Feb 2021 22:58:31 -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 A7E0A8030C7; Thu, 4 Feb 2021 03:58:25 +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 872065D9EF; Thu, 4 Feb 2021 03:58:25 +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 4FF715808E; Thu, 4 Feb 2021 03:58:25 +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 1143w8pv003478 for ; Wed, 3 Feb 2021 22:58:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0A5985B697; Thu, 4 Feb 2021 03:58:08 +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 C8DFB5B695 for ; Thu, 4 Feb 2021 03:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411114; 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=Rp8UQqZKvc9Jx3ZMczrqWZE1qvx47xeKTzcXGkjJ5wQ=; b=SQKRi0k1Z+utgtcF6EnWxx5DJtGDlUU+YUdyoraxlBDbzlxpLV04r6hzaDFQxuYPWkC+Ka QAiR7d87O9pyImG+Z78UdjE8/vebtJAt22E2SekXIxzrjZkLneNgqQYP3ZO5aEwtLF4QOI 2NbT3ykQ9cQ/Q3KTVxOzITJRR4Swv1U= X-MC-Unique: ji2yCgKrMxSGpn1qb6XiRA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 20/24] util: rename two *Free() functions while changing VIR_FREE to g_free Date: Wed, 3 Feb 2021 22:57:47 -0500 Message-Id: <20210204035751.164765-21-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" dhcpHostFree() and addnHostFree() don't follow the normal pattern of *Free functions in the rest of libvirt code - they are actually more similar to the *Dispose() functions, in that they free all subordinate objects, but not the object pointed to by the argument itself. However, the arguments aren't virObjects, so it wouldn't be proper to name them *Dispose() either. They *currently* behave similar to a *Clear() function, in that they free all the subordinate objects and nullify the pointers of those objects. HOWEVER, we don't actually need or want that behavior - the two functions in question are only called as part of a higher level *Free() function, and the pointers are not referenced in any way between the time they are freed and when the parent object is freed. So, since the current name isn't correct, nor is *Dispose(), and we want to change the behavior in such a way that *Clear() also wouldn't be correct, lets name the functions *FreeContent(), which is an accurate description of what the functions do, and what we *want* them to do. And since it's such a small patch, we can go ahead and change that behavior - replacing the VIR_FREEs with g_free. Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/util/virdnsmasq.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index c21819c981..653d46bef9 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -50,20 +50,20 @@ VIR_LOG_INIT("util.dnsmasq"); #define DNSMASQ_ADDNHOSTSFILE_SUFFIX "addnhosts" =20 static void -dhcphostFree(dnsmasqDhcpHost *host) +dhcphostFreeContent(dnsmasqDhcpHost *host) { - VIR_FREE(host->host); + g_free(host->host); } =20 static void -addnhostFree(dnsmasqAddnHost *host) +addnhostFreeContent(dnsmasqAddnHost *host) { size_t i; =20 for (i =3D 0; i < host->nhostnames; i++) - VIR_FREE(host->hostnames[i]); - VIR_FREE(host->hostnames); - VIR_FREE(host->ip); + g_free(host->hostnames[i]); + g_free(host->hostnames); + g_free(host->ip); } =20 static void @@ -73,7 +73,7 @@ addnhostsFree(dnsmasqAddnHostsfile *addnhostsfile) =20 if (addnhostsfile->hosts) { for (i =3D 0; i < addnhostsfile->nhosts; i++) - addnhostFree(&addnhostsfile->hosts[i]); + addnhostFreeContent(&addnhostsfile->hosts[i]); =20 g_free(addnhostsfile->hosts); =20 @@ -270,7 +270,7 @@ hostsfileFree(dnsmasqHostsfile *hostsfile) =20 if (hostsfile->hosts) { for (i =3D 0; i < hostsfile->nhosts; i++) - dhcphostFree(&hostsfile->hosts[i]); + dhcphostFreeContent(&hostsfile->hosts[i]); =20 g_free(hostsfile->hosts); =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 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=1612411162; cv=none; d=zohomail.com; s=zohoarc; b=WTpNFnZE3+w0xmWJ2HROfnstOkswOnSav47OFuRIxOo6KYi02T6EuIwFP/uZjEKf4ZQdwdw/iH/31GiApezCUGASohQMn/+eIA97kM+CjR5cHXYRGlZ6z6YVZ2fZxRnDi1SVQvHnIXKP9jQtoExkNSrb7GdHemI4z131KZ4FV3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411162; 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=dJLnjfwzmdDV+lDPcPqu1GLCafVTNgstv6DqV3VOb/w=; b=n/OVIRWeOww6ABQiaD45sE/WTDystO34r48GKRgnVYp1OUotc9bGKgUwDdPIBdA7rZxQoMJd6pIYnbK5ePLIifCvKuoI/Ud217h2gwnLOig9niSwCyXJl/7JS1fO0MO3NyR2NzOmAMUB5WYBqkoFaHy0rZu3XnXkHQT0ktfCxtE= 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 1612411162177871.1450638919283; Wed, 3 Feb 2021 19:59:22 -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-570-YCJBcawxO3CGDzNrGg-3KA-1; Wed, 03 Feb 2021 22:58:28 -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 1F1C81007496; Thu, 4 Feb 2021 03:58:23 +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 F09215D9EF; Thu, 4 Feb 2021 03:58:22 +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 BA0B45808C; Thu, 4 Feb 2021 03:58:22 +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 1143wGM1003578 for ; Wed, 3 Feb 2021 22:58:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 251685B697; Thu, 4 Feb 2021 03:58:16 +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 E3EEE5B698 for ; Thu, 4 Feb 2021 03:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411161; 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=dJLnjfwzmdDV+lDPcPqu1GLCafVTNgstv6DqV3VOb/w=; b=NwqLPssXU/khvgEbwffKSuLrKrKyJzSjoL8BubsG9fESSDu/AMo6Zcrx/OBJPDAJDvXpdm EyMBjrRwowEfC89Gr60l55Itz9F+A4jtvp9BznIQ4bhbIrLs09ys62YwdTdkWJqR4FV0iF MWVYvjQ/uw5MaD1Edv8o6Pvh5Fa0y6w= X-MC-Unique: YCJBcawxO3CGDzNrGg-3KA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 21/24] qemu: rename virFirmware*Free() functions to have more accurate names Date: Wed, 3 Feb 2021 22:57:48 -0500 Message-Id: <20210204035751.164765-22-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" Several functions had the names virFirmware[something]Free(), but they aren't taking a pointer to some object and freeing it. Instead, they are making a copy of the content of an entire object, then Freeing the objects pointed to by that content. As a first step in a too-complicated cleanup just to eliminate a few occurrences of VIR_FREE(), this patch renames those functions to more accurately reflect what they do - they Free the *Content* of their arguments. Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_firmware.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index fe30db4f79..c22b1f1e9c 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -188,7 +188,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareOSInterface, = qemuFirmwareOSInterfaceFr =20 =20 static void -qemuFirmwareFlashFileFree(qemuFirmwareFlashFile flash) +qemuFirmwareFlashFileFreeContent(qemuFirmwareFlashFile flash) { VIR_FREE(flash.filename); VIR_FREE(flash.format); @@ -196,39 +196,39 @@ qemuFirmwareFlashFileFree(qemuFirmwareFlashFile flash) =20 =20 static void -qemuFirmwareMappingFlashFree(qemuFirmwareMappingFlash flash) +qemuFirmwareMappingFlashFreeContent(qemuFirmwareMappingFlash flash) { - qemuFirmwareFlashFileFree(flash.executable); - qemuFirmwareFlashFileFree(flash.nvram_template); + qemuFirmwareFlashFileFreeContent(flash.executable); + qemuFirmwareFlashFileFreeContent(flash.nvram_template); } =20 =20 static void -qemuFirmwareMappingKernelFree(qemuFirmwareMappingKernel kernel) +qemuFirmwareMappingKernelFreeContent(qemuFirmwareMappingKernel kernel) { VIR_FREE(kernel.filename); } =20 =20 static void -qemuFirmwareMappingMemoryFree(qemuFirmwareMappingMemory memory) +qemuFirmwareMappingMemoryFreeContent(qemuFirmwareMappingMemory memory) { VIR_FREE(memory.filename); } =20 =20 static void -qemuFirmwareMappingFree(qemuFirmwareMapping mapping) +qemuFirmwareMappingFreeContent(qemuFirmwareMapping mapping) { switch (mapping.device) { case QEMU_FIRMWARE_DEVICE_FLASH: - qemuFirmwareMappingFlashFree(mapping.data.flash); + qemuFirmwareMappingFlashFreeContent(mapping.data.flash); break; case QEMU_FIRMWARE_DEVICE_KERNEL: - qemuFirmwareMappingKernelFree(mapping.data.kernel); + qemuFirmwareMappingKernelFreeContent(mapping.data.kernel); break; case QEMU_FIRMWARE_DEVICE_MEMORY: - qemuFirmwareMappingMemoryFree(mapping.data.memory); + qemuFirmwareMappingMemoryFreeContent(mapping.data.memory); break; case QEMU_FIRMWARE_DEVICE_NONE: case QEMU_FIRMWARE_DEVICE_LAST: @@ -271,7 +271,7 @@ qemuFirmwareFree(qemuFirmwarePtr fw) return; =20 qemuFirmwareOSInterfaceFree(fw->interfaces); - qemuFirmwareMappingFree(fw->mapping); + qemuFirmwareMappingFreeContent(fw->mapping); for (i =3D 0; i < fw->ntargets; i++) qemuFirmwareTargetFree(fw->targets[i]); g_free(fw->targets); --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411116; cv=none; d=zohomail.com; s=zohoarc; b=BbfPbH5rz3/7czS+L4VnSckAGHeiIRz11OyvT7g7xd/SZYq4JpU1i0D6ro3OJ1r0U02zYXokoChsT0n+EOZvlN6xdk2J+Ns9McUzlmeRlRE1BqEtsex430OIFRvH7EXtIo8wVkUcSrkYXH/Y8qge3Kmv8CqrI4Fa/saqUaw1QFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411116; 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=mRrQ+DBBc0q8CFb+yfGzoQSDbsZNkUDEXHQZci6tdlg=; b=HHsDALxoSzD3zl9HRxD/P+ekOYrtUsFJNWGCAxyxEP9jDgtOyNuzy4T3402veJ4MIWZI7iTVbo/2dgOclKbA9/UQ46rwsPeX9GyRxSqqGgVJtkX64RG8gMRwtTJ6HQQDya+w41rvcreOFJSPcs2y3/FS9fuKulsEEbIlmotT7Ig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411116879631.0125762249003; Wed, 3 Feb 2021 19:58:36 -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-116-7LzKbPBHMwaVVPj5tpU8Fw-1; Wed, 03 Feb 2021 22:58:33 -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 65086E75F; Thu, 4 Feb 2021 03:58:27 +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 441435D9C9; Thu, 4 Feb 2021 03:58:27 +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 110FE18089D1; Thu, 4 Feb 2021 03:58:27 +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 1143wGA5003586 for ; Wed, 3 Feb 2021 22:58:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7C4B85B697; Thu, 4 Feb 2021 03:58:16 +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 463525B698 for ; Thu, 4 Feb 2021 03:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411115; 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=mRrQ+DBBc0q8CFb+yfGzoQSDbsZNkUDEXHQZci6tdlg=; b=cJ80LER70BYaM5j7DuWXWo9Rv5rTOf8ltpmCm+DEWj3A2OpllBOSEXCs8ah68hCURjJQuk Mg/GUNdWEE6ehNbVMW4XbahP1LuwKy0sYtmw4A8LdoQpUJOmH2m0/8DIE6gWugUtM7dHjZ 2CxrW0/zXOlriS621K6xCM99iK80rjs= X-MC-Unique: 7LzKbPBHMwaVVPj5tpU8Fw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 22/24] qemu: pass pointers instead of copying objects for qemuFirmware*FreeContent() Date: Wed, 3 Feb 2021 22:57:49 -0500 Message-Id: <20210204035751.164765-23-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" These functions all cooperate to free memory pointed to by a single object that contains (doesn't *point to*, but acutally contains) several sub-objects. They were written to send copies of these sub-objects to subordinate functions, rather than just sending pointers to the sub-objects. Let's change these functions to just send pointers to the objects they're cleaning out rather than all the wasteful and pointless copying. Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_firmware.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index c22b1f1e9c..aad39ee038 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -188,47 +188,47 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareOSInterface= , qemuFirmwareOSInterfaceFr =20 =20 static void -qemuFirmwareFlashFileFreeContent(qemuFirmwareFlashFile flash) +qemuFirmwareFlashFileFreeContent(qemuFirmwareFlashFilePtr flash) { - VIR_FREE(flash.filename); - VIR_FREE(flash.format); + VIR_FREE(flash->filename); + VIR_FREE(flash->format); } =20 =20 static void -qemuFirmwareMappingFlashFreeContent(qemuFirmwareMappingFlash flash) +qemuFirmwareMappingFlashFreeContent(qemuFirmwareMappingFlashPtr flash) { - qemuFirmwareFlashFileFreeContent(flash.executable); - qemuFirmwareFlashFileFreeContent(flash.nvram_template); + qemuFirmwareFlashFileFreeContent(&flash->executable); + qemuFirmwareFlashFileFreeContent(&flash->nvram_template); } =20 =20 static void -qemuFirmwareMappingKernelFreeContent(qemuFirmwareMappingKernel kernel) +qemuFirmwareMappingKernelFreeContent(qemuFirmwareMappingKernelPtr kernel) { - VIR_FREE(kernel.filename); + VIR_FREE(kernel->filename); } =20 =20 static void -qemuFirmwareMappingMemoryFreeContent(qemuFirmwareMappingMemory memory) +qemuFirmwareMappingMemoryFreeContent(qemuFirmwareMappingMemoryPtr memory) { - VIR_FREE(memory.filename); + VIR_FREE(memory->filename); } =20 =20 static void -qemuFirmwareMappingFreeContent(qemuFirmwareMapping mapping) +qemuFirmwareMappingFreeContent(qemuFirmwareMappingPtr mapping) { - switch (mapping.device) { + switch (mapping->device) { case QEMU_FIRMWARE_DEVICE_FLASH: - qemuFirmwareMappingFlashFreeContent(mapping.data.flash); + qemuFirmwareMappingFlashFreeContent(&mapping->data.flash); break; case QEMU_FIRMWARE_DEVICE_KERNEL: - qemuFirmwareMappingKernelFreeContent(mapping.data.kernel); + qemuFirmwareMappingKernelFreeContent(&mapping->data.kernel); break; case QEMU_FIRMWARE_DEVICE_MEMORY: - qemuFirmwareMappingMemoryFreeContent(mapping.data.memory); + qemuFirmwareMappingMemoryFreeContent(&mapping->data.memory); break; case QEMU_FIRMWARE_DEVICE_NONE: case QEMU_FIRMWARE_DEVICE_LAST: @@ -271,7 +271,7 @@ qemuFirmwareFree(qemuFirmwarePtr fw) return; =20 qemuFirmwareOSInterfaceFree(fw->interfaces); - qemuFirmwareMappingFreeContent(fw->mapping); + qemuFirmwareMappingFreeContent(&fw->mapping); for (i =3D 0; i < fw->ntargets; i++) qemuFirmwareTargetFree(fw->targets[i]); g_free(fw->targets); --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411118; cv=none; d=zohomail.com; s=zohoarc; b=cRI7K41GKNcG7dbShO7giHPFn5FdT/jI/nHz19Ijg2oyhg2oB7ly1pArETk9dlU6f56PsurfuPQS/jKR55VYTx54GXxyR+ofcTBCTDXenqpZV2zx8Nskyms51ROFVThkPl06OABUIh/ubWEB+9nrCrqvcANFq5NWoInOzL2A5Ko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411118; 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=aBARn+5ZlihcQWlYJ+DW3T9qGarKrlQdXYYtW1Tm8RM=; b=mGzT7F1qUvUNRXvDwuq10NlCLjJDXjZCXpgyoXVlYnCj0i1/YDHNN2HDByiRBq/1VoDIrnh0kdUlCA5cwduohhDskTjwX8r+AwmtqpgoWie5TzrtJbeDkeZGo89usr6rc/8Qg1qf0kaWlFceb8tIuimSGcwFeTmzBgN9I+49ypA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411118946451.81905503920586; Wed, 3 Feb 2021 19:58:38 -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-144-fP6k_5ArO8OeqyswTBwffA-1; Wed, 03 Feb 2021 22:58:34 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 717F78030CF; Thu, 4 Feb 2021 03:58:28 +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 488C81A266; Thu, 4 Feb 2021 03:58:28 +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 14E451800237; Thu, 4 Feb 2021 03:58:28 +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 1143wGTZ003596 for ; Wed, 3 Feb 2021 22:58:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id D2C5A5B697; Thu, 4 Feb 2021 03:58:16 +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 9D32D5B698 for ; Thu, 4 Feb 2021 03:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411117; 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=aBARn+5ZlihcQWlYJ+DW3T9qGarKrlQdXYYtW1Tm8RM=; b=M383WAvUVitCILHYywf9dhEjDgKLwMPcd61gFoUyxZBeWVmzHy295d2AmUjnj3hX6LZxZu +53zNhtUaH4wlxtALZioy2a2skhSbTpQeoRBMjclTHv612orZ5r9uMzE9oajYnBh89oHft gQH7bzlcurUozLss9s/RBbPLOUlL4Ss= X-MC-Unique: fP6k_5ArO8OeqyswTBwffA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 23/24] qemu: replace VIR_FREE with g_free in qemuFirmware*FreeContent() Date: Wed, 3 Feb 2021 22:57:50 -0500 Message-Id: <20210204035751.164765-24-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.84 on 10.5.11.23 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" These functions are all only called as a part of qemuFirmwareFree(), which frees the qemuFirmware object before return, so we can be sure none of the pointers is referenced after freeing (and thus there is no need to clear any of them). Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_firmware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index aad39ee038..e6541d505e 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -190,8 +190,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareOSInterface, = qemuFirmwareOSInterfaceFr static void qemuFirmwareFlashFileFreeContent(qemuFirmwareFlashFilePtr flash) { - VIR_FREE(flash->filename); - VIR_FREE(flash->format); + g_free(flash->filename); + g_free(flash->format); } =20 =20 @@ -206,14 +206,14 @@ qemuFirmwareMappingFlashFreeContent(qemuFirmwareMappi= ngFlashPtr flash) static void qemuFirmwareMappingKernelFreeContent(qemuFirmwareMappingKernelPtr kernel) { - VIR_FREE(kernel->filename); + g_free(kernel->filename); } =20 =20 static void qemuFirmwareMappingMemoryFreeContent(qemuFirmwareMappingMemoryPtr memory) { - VIR_FREE(memory->filename); + g_free(memory->filename); } =20 =20 --=20 2.29.2 From nobody Fri May 3 03:02:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612411118; cv=none; d=zohomail.com; s=zohoarc; b=ifOfblYDnGB+QMeEi5zelubCuyVFy2IBAvVZzZOTVxtjLfoVHxgmZWYZCHYkzzDhxJ76Ep5OsWvNBMM93OFDlBXHePrVHzcU7VxrwkWrYwWiWH4CO7709K4eR9uCzj6K5IeBs8N1jchPsExL0FIJZ4cp5sqvUuFqQyzmM80Dovw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612411118; 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=i0vIRyn+JKsbcMDRJKp6dVn1UrhM/uLUoFsmD9vC3P0=; b=WhacWJ8WEBUJzmDpPaQM04pMs9bj9S2u+0OlgH5nSPtM05sgEwNU5jtR8NGKmxJJb9kpmomm/6ed6FecWzHHyORVwHqex/9X0H9nS4jmJ7OcP5ZEUIUHKOD2KjtIV/Ex/c1hzg7ekuk+er18OHr1DqyJQ6XzyiBdVQLM1VEEIKY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612411118492954.5053346213425; Wed, 3 Feb 2021 19:58:38 -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-240-pNPA5KIDO5CmbvCbMakXMQ-1; Wed, 03 Feb 2021 22:58:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D7B58030B1; Thu, 4 Feb 2021 03:58:30 +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 EE50A71C95; Thu, 4 Feb 2021 03:58:29 +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 BB20258092; Thu, 4 Feb 2021 03:58:29 +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 1143wHc3003618 for ; Wed, 3 Feb 2021 22:58:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id 820FA5B6AA; Thu, 4 Feb 2021 03:58:17 +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 00A345B697 for ; Thu, 4 Feb 2021 03:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612411117; 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=i0vIRyn+JKsbcMDRJKp6dVn1UrhM/uLUoFsmD9vC3P0=; b=Om/++sfalkSrCoZLYpDqAyf3U27mup8uj0UCMjgW6qqGVw2RF8LzRLu8IrTxJiLljG844E er9GHKwmmYOOn49vIsCf+gpq4kFynWCHKte+FGClz/2/3pO0mU5d1LTepYFISYIXxGb1K/ y9CnG61ZqDQ4VgREFVFq/+l8tEfFuoQ= X-MC-Unique: pNPA5KIDO5CmbvCbMakXMQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 24/24] rpc: rename virNetSessionAuthMethodsFree to virNetSessionAuthMethodsClear Date: Wed, 3 Feb 2021 22:57:51 -0500 Message-Id: <20210204035751.164765-25-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.16 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" This is another *Free() function that doesn't free the object it is passed. Instead it frees and clears some parts of the object. In this case, the function is actually called from two places, and one of them (virNetSSHSessionAuthReset) appears to be assuming that the pointers actually *will* be cleared. So the proper thing to do here (?) is to rename the function to virNetSSHSesionAuthMethodsClear(). (NB: virNetSSHSessionAuthReset is seemingly never called from anywhere. Is this one of those functions that actually *is* called by some strange MACRO invocation? Or it is truly one of those "written-but-never-used" functions that can be deleted? (if the latter is the case, then I would rather move the contents of virNetSessionAuthMethodsFree() into its only other caller, virNetSSHSessionDispose(), so that the VIR_FREEs could be replaced with g_free.) Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/rpc/virnetsshsession.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index 4b56363fa0..5bfe311544 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -113,7 +113,7 @@ struct _virNetSSHSession { }; =20 static void -virNetSSHSessionAuthMethodsFree(virNetSSHSessionPtr sess) +virNetSSHSessionAuthMethodsClear(virNetSSHSessionPtr sess) { size_t i; =20 @@ -149,7 +149,7 @@ virNetSSHSessionDispose(void *obj) libssh2_session_free(sess->session); } =20 - virNetSSHSessionAuthMethodsFree(sess); + virNetSSHSessionAuthMethodsClear(sess); =20 VIR_FREE(sess->channelCommand); VIR_FREE(sess->hostname); @@ -971,7 +971,7 @@ void virNetSSHSessionAuthReset(virNetSSHSessionPtr sess) { virObjectLock(sess); - virNetSSHSessionAuthMethodsFree(sess); + virNetSSHSessionAuthMethodsClear(sess); virObjectUnlock(sess); } =20 --=20 2.29.2