From nobody Sat Feb 7 08:55:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612413604; cv=none; d=zohomail.com; s=zohoarc; b=F9L8tUMHbn9V2ov4JBbqOQFxQ9RmQZklFLrL3KoWzEjOTKMu+Tkk78NH9IEeA851lDV1sXvR8AHZ4LTL0J55tylqhUhbljr8KUHzx6xd23oqyOqcvUDevvq33o/8U+8fOzT7eZ15PnjkZbFi5iQ+rVzdUoPGQYPs0l/WXNt6FMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413604; 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=uB95Luct54h6RneGl3xQ4GgXLQcGjn5rm1EPACbOGtI=; b=ip4hN4JI/0JRGGFHJ4vuOqtkD33ZeLyC/xeC4ypBlNxdPoP0rni0ArA/JjZXS4OgSNJ/NL+F8KKCkZg3IZpTlfMfYf9vwMvl0putiXEXFzTC+txsXQc1tXXKCzSRAAgGC7rCs/u9Vw51Z/ir+npZ1zvFXieJuzVcfT3HIqHWwQQ= 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 1612413604259797.2789638002992; Wed, 3 Feb 2021 20:40: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-558-pf3R6PAoPaGaMWPdDkrS2A-1; Wed, 03 Feb 2021 23:39: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 95B1E801960; Thu, 4 Feb 2021 04:39:04 +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 702826F986; Thu, 4 Feb 2021 04:39:04 +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 3AD735807B; Thu, 4 Feb 2021 04:39:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cg3Q011357 for ; Wed, 3 Feb 2021 23:38:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C4F6100AE4E; Thu, 4 Feb 2021 04:38:42 +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 27205100AE4D for ; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413603; 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=uB95Luct54h6RneGl3xQ4GgXLQcGjn5rm1EPACbOGtI=; b=DBZwMbFS0/RcFn7ZQa+785raFcbxboMHbjgd+9pud7a4PQ46o0g74dj4Jmym5ch0FcF35U NjNF0rykvj1MnZsd4S8Hgxh+OOG+isHmAVbP8g44Y4YtOXBto31aSZ/rR2UzK4CMYcdFG7 BUMcPo8Jad5uwXdAt/Lss5PVMj5osEY= X-MC-Unique: pf3R6PAoPaGaMWPdDkrS2A-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 12/15] util: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:31 -0500 Message-Id: <20210204043834.191994-13-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 --- src/util/virdnsmasq.c | 2 +- src/util/virfilecache.c | 4 ++-- src/util/virmdev.c | 2 +- src/util/virnvme.c | 2 +- src/util/virpci.c | 2 +- src/util/virresctrl.c | 40 ++++++++++++++++++++-------------------- src/util/virscsi.c | 2 +- src/util/virscsivhost.c | 2 +- src/util/virusb.c | 2 +- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 653d46bef9..3eee4a5a84 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -604,7 +604,7 @@ dnsmasqCapsDispose(void *obj) dnsmasqCapsPtr caps =3D obj; =20 virBitmapFree(caps->flags); - VIR_FREE(caps->binaryPath); + g_free(caps->binaryPath); } =20 static int dnsmasqCapsOnceInit(void) diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index a761a01b25..14b2885505 100644 --- a/src/util/virfilecache.c +++ b/src/util/virfilecache.c @@ -74,8 +74,8 @@ virFileCacheDispose(void *obj) { virFileCachePtr cache =3D obj; =20 - VIR_FREE(cache->dir); - VIR_FREE(cache->suffix); + g_free(cache->dir); + g_free(cache->suffix); =20 virHashFree(cache->table); =20 diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 1f5c2cba30..db40fe8cc3 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -297,7 +297,7 @@ virMediatedDeviceListDispose(void *obj) } =20 list->count =3D 0; - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virnvme.c b/src/util/virnvme.c index af297552c1..a1fc9aab57 100644 --- a/src/util/virnvme.c +++ b/src/util/virnvme.c @@ -166,7 +166,7 @@ virNVMeDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virNVMeDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virpci.c b/src/util/virpci.c index b8e8422aa0..8147ce11e9 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1667,7 +1667,7 @@ virPCIDeviceListDispose(void *obj) } =20 list->count =3D 0; - VIR_FREE(list->devs); + g_free(list->devs); } =20 int diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4ee95aa232..29df51c652 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -210,18 +210,18 @@ virResctrlInfoDispose(void *obj) =20 if (level->types) { for (j =3D 0; j < VIR_CACHE_TYPE_LAST; j++) - VIR_FREE(level->types[j]); + g_free(level->types[j]); } - VIR_FREE(level->types); - VIR_FREE(level); + g_free(level->types); + g_free(level); } =20 if (resctrl->monitor_info) g_strfreev(resctrl->monitor_info->features); =20 - VIR_FREE(resctrl->membw_info); - VIR_FREE(resctrl->levels); - VIR_FREE(resctrl->monitor_info); + g_free(resctrl->membw_info); + g_free(resctrl->levels); + g_free(resctrl->monitor_info); } =20 =20 @@ -396,30 +396,30 @@ virResctrlAllocDispose(void *obj) continue; =20 for (k =3D 0; k < type->nsizes; k++) - VIR_FREE(type->sizes[k]); + g_free(type->sizes[k]); =20 for (k =3D 0; k < type->nmasks; k++) virBitmapFree(type->masks[k]); =20 - VIR_FREE(type->sizes); - VIR_FREE(type->masks); - VIR_FREE(type); + g_free(type->sizes); + g_free(type->masks); + g_free(type); } - VIR_FREE(level->types); - VIR_FREE(level); + g_free(level->types); + g_free(level); } =20 if (alloc->mem_bw) { virResctrlAllocMemBWPtr mem_bw =3D alloc->mem_bw; for (i =3D 0; i < mem_bw->nbandwidths; i++) - VIR_FREE(mem_bw->bandwidths[i]); - VIR_FREE(alloc->mem_bw->bandwidths); - VIR_FREE(alloc->mem_bw); + g_free(mem_bw->bandwidths[i]); + g_free(alloc->mem_bw->bandwidths); + g_free(alloc->mem_bw); } =20 - VIR_FREE(alloc->id); - VIR_FREE(alloc->path); - VIR_FREE(alloc->levels); + g_free(alloc->id); + g_free(alloc->path); + g_free(alloc->levels); } =20 =20 @@ -429,8 +429,8 @@ virResctrlMonitorDispose(void *obj) virResctrlMonitorPtr monitor =3D obj; =20 virObjectUnref(monitor->alloc); - VIR_FREE(monitor->id); - VIR_FREE(monitor->path); + g_free(monitor->id); + g_free(monitor->path); } =20 =20 diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 0c753c075e..2a9f6da76a 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -347,7 +347,7 @@ virSCSIDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virSCSIDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 int diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index 5907edbc7e..b7bf0da1b3 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -60,7 +60,7 @@ virSCSIVHostDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virSCSIVHostDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virusb.c b/src/util/virusb.c index ae400de656..6d897600e5 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -434,7 +434,7 @@ virUSBDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virUSBDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 int --=20 2.29.2