From nobody Sun May 5 15:01:05 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=1612409542; cv=none; d=zohomail.com; s=zohoarc; b=AQ4+TMspiU7LQePKHodGk81VRQYYFxyiF+VoqGQ+upeKGUqW4W5TcZmkx2KpXOnch1xJOzJvBjtinUxEl5w1jxg08lvdP1kSKomQPVDNAobLTcvtkWpnLHsjBFrdG/IwmtZk7Gmeg0cCac1/7ou+1ar2paa9AOztUk4M4SVK19E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409542; 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=bskgiGatLceDWef6jL5wkhooVHaunuhw5Gd50P4vlgF/p/rgKMkJyJOjcBqasH8HV4kxECo0wxL/CN4zraaZ4Ot/YnhQ8tv0x1MU5YGIjK/8KwlH2h3j5m7j4FifCCtFz3ik8wK56MVHn8G9BspbFsq5wepnBSY2qBy1+pGPG1w= 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 1612409542474550.4436468178446; Wed, 3 Feb 2021 19:32: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-542-XChY3V__NGCCFHCNCv8inQ-1; Wed, 03 Feb 2021 22:32:19 -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 E7974801960; Thu, 4 Feb 2021 03:32:13 +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 B527218E41; Thu, 4 Feb 2021 03:32:13 +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 4B02018095CB; Thu, 4 Feb 2021 03:32:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TUB4031494 for ; Wed, 3 Feb 2021 22:29:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id A72A577BEA; Thu, 4 Feb 2021 03:29:30 +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 7087077BE9 for ; Thu, 4 Feb 2021 03:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409541; 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=bU4wyZzTtiunQjRIIIhRVBLmSrPYnzT32ee3escAHIKsrI3wxJqSvQ4zD9Q5DnXebDwFtr 9ZFWR+PXOjlO8I997dfzKz2zzxo5n0KfdGg9YipdPzdiCCPDF8xmsu/lDadeRTjFOdBiJ1 snBYNknyYzoh6q8B47XN/F3s/JPJ2c0= X-MC-Unique: XChY3V__NGCCFHCNCv8inQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 01/21] conf: replace remaining straggler VIR_FREE with g_free in vir*Free() Date: Wed, 3 Feb 2021 22:28:57 -0500 Message-Id: <20210204032917.162962-2-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.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" I missed a few in commit f9f81f1c Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409561; cv=none; d=zohomail.com; s=zohoarc; b=L3nnxEZYICwaZUhzeH1HoEPGm5YxXgVBnvbdaNv34J1sAXM5X1wYsbC+se6KVWYvdOqNFFU68v0WX8VPAoqon8JZCiFjWCvw7gpQEeHmbvTp4xfTxMVm7pmdzkwGWZdmVARNFgrLbME3OiUOztMgVqDR1tg/nHyMAi1OB0qZG0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409561; 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=i40XFWY6rrEaOjJDip7fcEKFxS5sbnWTs+eujNw9tESsyZKWtgEiR+yy3Lv0VMCnmypHlfsDFh57Wkcq08FzgXBc69KPkDijlfu+B/+YXK4jbFvuB3qVspTjC/3z7tOhSkrEzrKf+xyMWHPPbDxQRIyhAN0zrLRQrMH4hN8k22g= 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 161240956163755.73420872278734; Wed, 3 Feb 2021 19:32:41 -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-540-JlVL6OEVMvufxb4-cKRplg-1; Wed, 03 Feb 2021 22:32:38 -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 ADC5D10066EE; Thu, 4 Feb 2021 03:32:32 +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 87FF85D9C0; Thu, 4 Feb 2021 03:32:32 +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 523D318089D3; Thu, 4 Feb 2021 03:32:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TVQe031502 for ; Wed, 3 Feb 2021 22:29:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2CD22779FB; Thu, 4 Feb 2021 03:29:31 +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 CA5886091B for ; Thu, 4 Feb 2021 03:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409560; 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=fPjppU25am2pG/OI8Y2Rwv4Mw6et1uM1bIjK5+pCrQtjghncbazGkhEfk7qPFDmHAVT5td GKKNO+RM37AyowqxoNlWF3y262iFEZskobGEubGNO0WY9EP9QeF5kUxLed/rB3YHdaOJWv Szid+8usSfVJB4tVWfKzwXAJ+GKuJHE= X-MC-Unique: JlVL6OEVMvufxb4-cKRplg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 02/21] util: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:28:58 -0500 Message-Id: <20210204032917.162962-3-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409554; cv=none; d=zohomail.com; s=zohoarc; b=L25FROLXOGsajSHYAgVNfudTgC2fdkpnIV0jtya/0gWeWnYqp98hj9CU5eLNzMgCWdknWQdNkCiv36v4zpDsJzc+bsHD2qxmfkk3l7lySV6bbxIWqyRTVtHWUNRFvtKkpGs/9TqcYIAh+hdyHJ3I9JAk84SxJwBX1kv1wPUVdgk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409554; 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=O5GzMGssHhRhrVQmwHYmS9RI4jD3SKczlmYDFP9r/UH9M5iBHdwNeOmemoKGQjWXpIRWewAs4UH7nWV/+7F27z9I6IPOKpzxqokWELCVbuFEIcHkf5tqSqbj84qv7ptQh+ftmTSJeXj5t/+7wd5dozGYOvC5h0VeQPv7ukGLZi4= 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 1612409554264657.7947401035851; Wed, 3 Feb 2021 19:32: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-452-T7d_vojyPc2PVSbSUXjweQ-1; Wed, 03 Feb 2021 22:32:30 -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 B7E0CE76F; Thu, 4 Feb 2021 03:32:19 +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 91DDE101E817; Thu, 4 Feb 2021 03:32:19 +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 312A218095CC; Thu, 4 Feb 2021 03:32:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TVt3031509 for ; Wed, 3 Feb 2021 22:29:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 83B6D779FB; Thu, 4 Feb 2021 03:29:31 +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 4E8596091B for ; Thu, 4 Feb 2021 03:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409553; 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=NToRCyM3MbJQvcroAiZj2XyXidZ4dYoWFxSc+yxuGHqaBKM2j/fs0u5M4vBuTe6AQutADn SX8aavXd3hhV3BXkr3adiKgYf15zm6eEfxeNn4vyNAD3QrLFqW2pGS/TZQEFzdFWH5HoL9 CeDZzYTgeu1PsJ0qVO6rTK5yupUavMc= X-MC-Unique: T7d_vojyPc2PVSbSUXjweQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 03/21] bhyve: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:28:59 -0500 Message-Id: <20210204032917.162962-4-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409644; cv=none; d=zohomail.com; s=zohoarc; b=Y0sUMj4Z/RZVGHt0wBEptA7Pe+SVl0Sb3/1XTqR/I/0uXtTVgJyjokfQmnByW74z7TcTyTjitODCBZ+Se40CC+ckqUoE3boL9KcbzAW6wq9kSthcMIB9PxI5MKwzCOfkMOKTQjAlLIxmJ7QEH8IqC6r1RBBYVY3nVVbLoV0FA0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409644; 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=K1tH3eMYB7+PuV2O1xCBctgzyKlCu1zKTbETi4Pn0yPc3EE7di+JogZf+hpKwjTV/m+KoBuy9yEOooutaSXsJtNECVSbO8alC2XOtrcwtPlQ2OSX+1F3P3XJ5sbKmsvSPcG/hJB2x6AdomBga6NCtd5+PE31hrailLnWZxgTDMU= 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 1612409644118898.5342223457686; Wed, 3 Feb 2021 19:34: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-598-GmZrZb1SPdm9pXAfiN-3Aw-1; Wed, 03 Feb 2021 22:32:41 -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 A6D39107ACF4; Thu, 4 Feb 2021 03:32:35 +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 7F6DD101E81C; Thu, 4 Feb 2021 03:32:35 +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 49B7257DFF; Thu, 4 Feb 2021 03:32:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TVGJ031515 for ; Wed, 3 Feb 2021 22:29:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id DAD396091B; Thu, 4 Feb 2021 03:29:31 +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 A5BFC77BE9 for ; Thu, 4 Feb 2021 03:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409643; 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=KW1fMmlmffFPKHOwUnN+yRulXSYqELvP7MRNw3Zhg1wXWkOZgEa1argHMZhILqkdfsWmwS SHM0vdY9Cnb7y80F3DQs4h63z1f6NEJsYQK2mFYZC1wokvIZHr7wZkcxA6DT33nd6idfeQ Lm4A8NmhviIcPFytRbQz2wxWdTNQH9Q= X-MC-Unique: GmZrZb1SPdm9pXAfiN-3Aw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 04/21] libxl: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:00 -0500 Message-Id: <20210204032917.162962-5-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409664; cv=none; d=zohomail.com; s=zohoarc; b=KpcyrLsigqRM8fyLVFoHAz+K/XKpPhIQbUqDvzi0NuqksHXSSAsKoY6xh8r11ogQlhHrr4sIVePdremrKmauS/pAP/XNbsmYKBKxwZWvDP50Axfid16qi2gNBh1XuFt9XAinhkQIHUDk+F0bkPxqJBsTJMEDkEP+l90/cUbL5WI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409664; 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=K3SWv3NI1dI0UMx4WgXMh1T/Rwx6TVSkSabfpDnV0SzyKgqPwd74JMMoHknVWZLZdzrOjLgt8QJrBAuIDRMskswBqQPDpGovWT2k386fKI4Vf8VzYN8PvLHbJnAC7wpolPNeM7OlZtedazGD0Cx0MIZsMQTxIYcbaQHuVgzMp08= 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 161240966479347.209835246241255; Wed, 3 Feb 2021 19:34:24 -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-109-NQAHbzaeNuWJ0xYWnFMp1Q-1; Wed, 03 Feb 2021 22:32:28 -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 5777210066F6; Thu, 4 Feb 2021 03:32:22 +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 34C895C257; Thu, 4 Feb 2021 03:32: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 F2A6A18089C9; Thu, 4 Feb 2021 03:32:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TWLl031520 for ; Wed, 3 Feb 2021 22:29:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3E48E779FB; Thu, 4 Feb 2021 03:29:32 +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 090496091B for ; Thu, 4 Feb 2021 03:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409663; 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=Vx/cj/ZaufGwgz9OW98D4U1gx3Q1LDkoNR9fU2Aey3U4u/izn46Gedldq/4ruWuRIRO4Ok q/rGaafQM6pLouOHNP5/X+rA5VMCcTPu0V68Lk1Fns9qYitbS1p0taiFl1p2e7VvXLWLxR zsIGEEqYrg7zAkD08omZhJSUHkyYMCI= X-MC-Unique: NQAHbzaeNuWJ0xYWnFMp1Q-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 05/21] qemu: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:01 -0500 Message-Id: <20210204032917.162962-6-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409763; cv=none; d=zohomail.com; s=zohoarc; b=EYijA+fQs2luLPgoofgWCLGcTmU5tmNnrQkiiYbNrYP5HDtXCzELrFh0aDxn2Lt0tculfUpaDFm3wDU57n0Mk2e9O2hGO3lUQKO5DG44c5hF+UY3kPbNbS/M49N5RmzmgrNHymUB6HhzuNULsIwpS9Bh3AFYrYkUfvXetfWPvvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409763; 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=lZ1mXw7s6PiHAt2AYf0THTZqBa0yXUe3Ijqatro+eQ2XPY/byRBx3+EHQxirIv6XQWgiLf5SUzZNEHcSEcwlrsfHGPjgd8Mb6DbaVwkCuTwwLiCgIBsuqJYInCnC65Sdj0ZA/zsFy7atvgq+vk1Zou7iHMb29z38kwOPTatP9uY= 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 1612409763687776.5344732336835; Wed, 3 Feb 2021 19:36:03 -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-93-92eYzq17Omm6U7kJJSzl7Q-1; Wed, 03 Feb 2021 22:32:44 -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 C7AB48030B6; Thu, 4 Feb 2021 03:32:38 +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 4BEE0722D1; Thu, 4 Feb 2021 03:32:38 +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 15F5158073; Thu, 4 Feb 2021 03:32:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TWnn031528 for ; Wed, 3 Feb 2021 22:29:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 95C446091B; Thu, 4 Feb 2021 03:29:32 +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 5F1FE779FB for ; Thu, 4 Feb 2021 03:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409762; 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=E9528SFX0rmzeKnTeA2xxXRd4yz948OXfRTPUbhur9fcoKYCmg51mfzw6odmyAsdMl0Mij wn78pzb88NIYEW2esywYWV7uQXl5VKdgOXik/RYZVnl5HUwYkt5pNY3Rpg5g3qi/zBo24S JzwjAaVVlHQYlaOvYsKQtcp030nTvg8= X-MC-Unique: 92eYzq17Omm6U7kJJSzl7Q-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 06/21] test_driver: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:02 -0500 Message-Id: <20210204032917.162962-7-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409570; cv=none; d=zohomail.com; s=zohoarc; b=ZugiiggI7lgGFPj0tiH/ru71qDwEE25AW1QEI1vKQ7lfQqOTlBiMZaCCGFS6EKqyHWyp5nUtfoxrqkM8VzItZ5pBUq/X63zHDYCYvSsv3B4BH7FY4Z/p1ou/ukwunDv539Wr7NWEIXTYsL+rgETFhPZTKftoGKOM3r4gIF/P1GE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409570; 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=UvW1kHvaeWs/p853fPBbV/uowlzRtB+InlqvGq0SwuZIQTkHnpQE9b2k/DiHQQCd8yVWRMHtWLv18kCeZNHPK2A/HZ2fZ42fwntL2zdop2U7mCqLSH4dM1d+hruVjAp6V8IUtJ8m79JieHQBg3uSHRs1hSNCZ12rAez0t3OIbXo= 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 1612409570481183.28151043974538; Wed, 3 Feb 2021 19:32:50 -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-41-E8LZAiy5PuSGcEK2Nwv_5A-1; Wed, 03 Feb 2021 22:32:47 -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 2887B183CD0D; Thu, 4 Feb 2021 03:32:41 +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 08D9A5D9C9; Thu, 4 Feb 2021 03:32:41 +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 C62AB18077C1; Thu, 4 Feb 2021 03:32:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TWN8031538 for ; Wed, 3 Feb 2021 22:29:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id ED3DE6091B; Thu, 4 Feb 2021 03:29:32 +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 B760C77BE9 for ; Thu, 4 Feb 2021 03:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409569; 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=Rh/DD8PeZLqXbRbFO+8KFGARSJnnoWqFJ2h1DjNH53SKNdJhYOhIK9CA7VHBWFW3i4ucT1 j8GenTOGcxR9OZRhbxQ7MgRiH4uvPqiYgfKa7L7MiUyZkdDh+3tF6SjWzxW1U0zCHC0/8r LOQn59Wz0y9PS1/HBBdLAKeB3O0yWa0= X-MC-Unique: E8LZAiy5PuSGcEK2Nwv_5A-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 07/21] vbox: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:03 -0500 Message-Id: <20210204032917.162962-8-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409732; cv=none; d=zohomail.com; s=zohoarc; b=jROFkMYpYFelLNSRC6Xb+kOjPIfqRDk7mftNCi/4cVIS6OT2UqwVv6S/Kp6sD92F4+SZp6V9sMrgwRCcuGpbKq4VdQSL+lsjRkU5G31Sv+XAfDWg3TG1kCTPtKhQCK4yI2wv0WpF97ND2Y3CNwiClW9xvPa0e7qYPCfh0vKlZoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409732; 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=JJH6xUVUcSsFose8of0e/xlucg7alNtjuXWN/ZWqfHfq77nlTlehV8nmjwnH2UHKjwi91Ju8hJtqkXB0A64vtWVmZ9WHNt8v9hkrhHKenlFAjlIxox/SBF2rXmwJFojhzo4EX7oSKHXd+cHqDwc5iSsAKV0y9Epjl953crs85N8= 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 16124097326364.677028634503358; Wed, 3 Feb 2021 19:35:32 -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-401-fnR2aUfbOzylv0WjuK_gIA-1; Wed, 03 Feb 2021 22:32:49 -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 C35D710066ED; Thu, 4 Feb 2021 03:32:43 +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 9F7D75B695; Thu, 4 Feb 2021 03:32:43 +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 66C1758078; Thu, 4 Feb 2021 03:32:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TXWj031548 for ; Wed, 3 Feb 2021 22:29:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 502AC779FB; Thu, 4 Feb 2021 03:29:33 +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 1ADD26091B for ; Thu, 4 Feb 2021 03:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409731; 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=R+djkKHRy0pUusXiGHuKWSWwe5jREOulpn0ox1CB/AAl+sasoxTNDeFnLjYywu0qK9T4MP zkQotoKIjnNxcX+j6t41RjJm5f8lFlo3zh+F4eQsEgm22gLJ5RCJb93jI5HONLjwc7/Bqg HAq5hyEfXEi62klFjCDJ0Lk489TtH+o= X-MC-Unique: fnR2aUfbOzylv0WjuK_gIA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 08/21] vmx: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:04 -0500 Message-Id: <20210204032917.162962-9-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409656; cv=none; d=zohomail.com; s=zohoarc; b=BNbemuILdk9+wFQnBslfngm7rf1ZYOtwigOuHQMonxD82x/i3VwA3c6414wmc3wVcdtrxBpepOs00bOcoK/cqyHNgIEOb2n78CRsK6o3b6OvWOTaKS5apccjzJ+hhlN7nvPDdUkqNzweS29IngwmYmyfakGasL0pEcRydGdNYyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409656; 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=OQ1qVEIn4zPfvK2jlihwnM2oTVjY/u28uNi0WK2lnaGmcJSeBLskL5EUahCQHyPNYAeJZkJbsiAXDOa7d2UI/zUFF8rxFKTivbob5op5Fb1McddZLUaVzmJF2BI8FqtyKjfU6x7pI/IwGZeDnRf5ljwDa9YM/v+bORxGLDCOS44= 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 1612409655996774.8814587585763; Wed, 3 Feb 2021 19:34:15 -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-166-lCzt-JS-Nri92XHdCLiGNg-1; Wed, 03 Feb 2021 22:32:30 -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 075EA801960; Thu, 4 Feb 2021 03:32: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 D5B0D722D6; Thu, 4 Feb 2021 03:32: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 A14C34EA31; Thu, 4 Feb 2021 03:32:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TXbm031555 for ; Wed, 3 Feb 2021 22:29:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id A7CD2779FB; Thu, 4 Feb 2021 03:29:33 +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 713106091B for ; Thu, 4 Feb 2021 03:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409655; 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=C6xNvaxLhOFzQdn8utotlJR0brSj+txKnshwYsTFTHzjJrtPxg6xythSy1vH16cAuKmP8v E9E7dWDsfiRktkU+hOpOxW7PJjhhJI76As7oBSZjPlVYq6G5MHrGcVJD7TsiMYlh4ZjF2R evVZqY3S6eu2D9UHjDfws4xCbQ1gjKc= X-MC-Unique: lCzt-JS-Nri92XHdCLiGNg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 09/21] vz: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:05 -0500 Message-Id: <20210204032917.162962-10-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409557; cv=none; d=zohomail.com; s=zohoarc; b=X1DgZEVcdkUu0CvMslcfT844YGsEg9/s18X0wxBUYwcukk8+HBsyJFrLJAzzyDncBoub2+8U8W9ZHl3ytYwnUiXezq+QlQ4dOHz6Ay/fEMUtbbVkmXjDuA4bmR7aRiCYcLBwIZUPAyZzFV0Uj++jMXSlT+f5fju0UOORKBXfCaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409557; 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=ngNg5jE65rp2zKMQXG0scDlotJEy9hOTwANR0O0o9LyCGXL664/TmKZDH1o24v56kAAQnNaBQ7yPU9AjB6OZe3Z5t+YAq6BtBNnWHbLhBKClI47ZEwLr1oKKEiks8ByofYKMJXNFKluxh8FQtuhktiPdtpVANqBZCPmLAUxoViI= 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 1612409557145613.5963132017022; Wed, 3 Feb 2021 19:32:37 -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-429-hpqaqIohM924f23IwHdOyw-1; Wed, 03 Feb 2021 22:32:33 -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 C76688030BA; Thu, 4 Feb 2021 03:32:27 +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 A2AE85C257; Thu, 4 Feb 2021 03:32: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 69C694EEEC; Thu, 4 Feb 2021 03:32:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TYoG031560 for ; Wed, 3 Feb 2021 22:29:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0CF31779FB; Thu, 4 Feb 2021 03:29:34 +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 C83EF6091B for ; Thu, 4 Feb 2021 03:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409556; 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=b7Kxnrkf05NRCO8TRF2qDAf9RjhRpDFASd5pz6vQsCvkUS16DhgjBCdVKx2/1iVzkqACfc 3ruB97iO3kPhz1DRriZvMKNM0ARO8Hf2TcseAWAwm07Egs9fG+GZrbtgjK16ezGnp0HBVa pDzdH494ShSe++hWXFwkmjGXOTxB+Hc= X-MC-Unique: hpqaqIohM924f23IwHdOyw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 10/21] admin: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:06 -0500 Message-Id: <20210204032917.162962-11-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409772; cv=none; d=zohomail.com; s=zohoarc; b=dtiRYcv7BO57ivPsu3Lfa9glqbieyKs01HjHS1wOoMVMVnqdi9G43odSMnY/cBvw9UdkikV6QGtU1olF3+mrZSORp+GE7o1UUzztwJK+x9exDGa2nDCN193X4oBvhBf9pMi5sxSRHb8DgMFK+Lfx+NwNOZkYac24GfUhkeB7IgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409772; 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=jexk9ZTyYl8pDdrnu3r9bSCHyZOZJW+G9zcpjgDc8E/J811vtRc1umM31HvoRMw+4ZLd3vLXoVS8k5UcHuSDFy5LG67ELwNiRRtLk/htOnEggNkIqOPqBPcVIYgDJq67/Sx5AdBAJi1NjoyB1ATLcgOjZ87m1BJT/YhoRR3flUg= 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 1612409772136437.5753796970739; Wed, 3 Feb 2021 19:36: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-493--ljoDPbiOK69INNtdh72OA-1; Wed, 03 Feb 2021 22:32:52 -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 971848030C6; Thu, 4 Feb 2021 03:32:46 +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 721C9101E590; Thu, 4 Feb 2021 03:32:46 +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 069485807D; Thu, 4 Feb 2021 03:32:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TYYN031566 for ; Wed, 3 Feb 2021 22:29:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 651276091B; Thu, 4 Feb 2021 03:29:34 +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 2DFAE77BE9 for ; Thu, 4 Feb 2021 03:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409771; 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=Ziic6AJVLfW7bjOjQsTbm7Y56+4YsjWCF8gDPac7y1O4sfLlDS7qDwt9EacJBY3Gta07X2 MWlMv6ilHPpJZCXBHGyzU7FS0zvfGV5jjV1VMxUA99W4QLSFfNZJZagAdbS3tuszeozNrW JqTwRCcwVZnB+p6WMvPgpk5SfqtiInI= X-MC-Unique: -ljoDPbiOK69INNtdh72OA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 11/21] locking: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:07 -0500 Message-Id: <20210204032917.162962-12-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409883; cv=none; d=zohomail.com; s=zohoarc; b=Jl/4dxojAadRHyB1/MI71HlWQcSMjywo7SfoUDsjy0TFKJc6N5J22BQPRtlbjT97NDb0TDOL6CsfpaXoRArSn7pUhnHhy5GIRYeXYhLdIXnFiXb1gvWZyJRyNW9xHE4KbmWmD/Zl8yy8oWCrKY0MX7rPJ9zn8H1bXQ4mgTw89NU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409883; 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=KekTzoKy35O/8MLc83om93+BdFkVTozNLCC4m67wTFa/2OFf8DaUDRoCwcAPmxeBPYV0Yya9DaMZMQ9ND6Ro1x5Yj3UTmhqrpnSL7xqSDdNZYNYJCJtx5XouG0BWrIGjNwN2/AZrrWElbhKrHxY7beXRzYJKQDN+LCOW5GEZWZM= 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 1612409883787232.83796941568608; Wed, 3 Feb 2021 19:38:03 -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-46-HAhKLohYO8ahg2G4ouLFgA-1; Wed, 03 Feb 2021 22:32:54 -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 45250183CD00; Thu, 4 Feb 2021 03:32:49 +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 235FF5D9F6; Thu, 4 Feb 2021 03:32:49 +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 DF1BD18077D3; Thu, 4 Feb 2021 03:32:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TYq4031571 for ; Wed, 3 Feb 2021 22:29:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id BD132779FB; Thu, 4 Feb 2021 03:29:34 +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 86A7B6091B for ; Thu, 4 Feb 2021 03:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409882; 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=iwr44U8Sl+VlWOhUodO/Z5360q2XsF2vw2eA20KEFKt+KAiq7GH7ncv5yCALg86uaha2aO BB+ONb6iN9LNI8KqrrunioHewF29MuB9Jmt05tpJiVtipp8+SmROtL0M992O1FiS0TeSQi xFZZONC5hWHCSbOLggOlfQqBGVulpQI= X-MC-Unique: HAhKLohYO8ahg2G4ouLFgA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 12/21] logging: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:08 -0500 Message-Id: <20210204032917.162962-13-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409716; cv=none; d=zohomail.com; s=zohoarc; b=ZoaspVuhP8ka3oEdEg4dFMxunJPAMmUaaZBL9HvphZelZA1zDpSDGreip68CxXCbuYZyRzhFqPG4VNs6M8ar2uxcNKJgjzlGKYK5hc8qdmdWI8aWn+xyMFAJmLsmPNrsw/ptYFs/OxFnHTojXrkdpoACqlzRiTBzQQBLEZzImUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409716; 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=OVfQM9WS2Hu3tNsyCad+K9/tVaFOZt15UMKsxhfEMjImF7JFFJUN0HW13hao34rVYeojS69t/WmCnRnDuzsLMO6yAg+OI1I7OKUrmKkAx6cvQ/0nQ4zl9j3N6CmfZhx+K4o7QOeerAW3XJUVbuF+LNmxCbOnG9OUAYr3KPF/730= 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 1612409716509572.6775453014075; Wed, 3 Feb 2021 19:35:16 -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-120-TpPztPCDPhefd9EUNF8BTw-1; Wed, 03 Feb 2021 22:32:57 -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 00760E76C; Thu, 4 Feb 2021 03:32:52 +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 D340D5B6BF; Thu, 4 Feb 2021 03:32:51 +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 A183658085; Thu, 4 Feb 2021 03:32:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TZOw031579 for ; Wed, 3 Feb 2021 22:29:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 22FDE779FB; Thu, 4 Feb 2021 03:29:35 +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 DE5996091B for ; Thu, 4 Feb 2021 03:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409715; 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=L9YxdavGEh9YC4z3lUnwpOTlv2GOKTiTKieIT6WP17h9ZgIqKfMxm1kXQC+mVG3vkD29VB ihodbmxxn4J/FKnACB/KlRml8au4o6/wll99jUYUPCTFHrjxdRBa4ZJVnWXVhIR/r/S9uF XbOS/vKRxYGoZRxRn5udggfB5nCvShs= X-MC-Unique: TpPztPCDPhefd9EUNF8BTw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 13/21] remote: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:09 -0500 Message-Id: <20210204032917.162962-14-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409579; cv=none; d=zohomail.com; s=zohoarc; b=Ho8MI4BIJGwToTQRc3ZNuS93d+mnt4bcZXM5K5teZzR5vgFfk/DKekvCpuoGwirkjwuY+6EIvFYiAgrpoyZe7+HeXybcA1C6gpFJaIO/lSO5ucIVCQpJRKqAaGg29jAsTZYoJXedfGmYm4rUTYAOlR3xmFQ1YrKnmCi/h3+7pSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409579; 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=oAICKCefSvZNHQBCNHTpfce9KXPTxAh+0QAV4+6acUAwolLMmpDzcDjHFd+PSt3Xq+bKQU0mY5rHfxNEIHEG4baP2P2/8tsgJCzTRhIG/apx3kQ8/RAEeEFA0TQbrbSOST7rFrGfZhSieIVmN0SH+lXpPjAeV30y/nzsuleqT5s= 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 161240957919284.02227236617352; Wed, 3 Feb 2021 19:32:59 -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-169-KUr3ZYMPOMOsl3hQT268xg-1; Wed, 03 Feb 2021 22:32:55 -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 93E6610066F5; Thu, 4 Feb 2021 03:32:49 +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 4940B5D9EF; Thu, 4 Feb 2021 03:32:49 +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 105FA58080; Thu, 4 Feb 2021 03:32:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TZNU031590 for ; Wed, 3 Feb 2021 22:29:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7BCFD779FB; Thu, 4 Feb 2021 03:29:35 +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 4486E6091B for ; Thu, 4 Feb 2021 03:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409578; 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=eKVUlMXvbN4ivF8rJQWZhJlikvd5dJaSGdSjR/2kWfqzo14tjzId2z6+i3hYgGGdOB+sOZ a/QqJdNJBcIY4nFvKQfUpiXPX/+jGz/fDVg13ugec3NUiSxyEGsYWWVpdHM3sAs9q0opIX pQVLY0o8qK+Btu0/4RMaqGL6V9VETPM= X-MC-Unique: KUr3ZYMPOMOsl3hQT268xg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 14/21] rpc: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:10 -0500 Message-Id: <20210204032917.162962-15-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409598; cv=none; d=zohomail.com; s=zohoarc; b=MmRdeE3GoxksRWWlQ4+R8GVqbB/YHE9wqFxU7k2fbzZyx+DuDI+JDbdRwT8H0td8ff7tZsC62gNJCZX5uAmZayp4GisIv4WIMmHHyQM4+b9glETtlIBQORTwCmahlH9RgVNvnKgkXm882q6vOm5Bs92w20btpI86j/3082N0x7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409598; 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=USvi785xiNI0gpDYe0yxSmQsAqri0x8zfzqgPg4jSzqBomLTvXoPBk2VuFr4O/LKbB+RGERYvMmdlAIauyeNtLdfX3hYbGbyFVo0RjEunngY4agvozUTHsvIpzZAbhRDN0yV6onFJmXRhQ5uxvAf7xTr1aa4zUBHgTYIMorISkk= 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 1612409598793128.1926930338019; Wed, 3 Feb 2021 19:33: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-367--HPWXXUPP3a3o4VYNtHlKw-1; Wed, 03 Feb 2021 22:32:37 -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 22817801964; Thu, 4 Feb 2021 03:32:31 +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 F0D6471C86; Thu, 4 Feb 2021 03:32:30 +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 B8C0E1809C92; Thu, 4 Feb 2021 03:32:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TZZ6031600 for ; Wed, 3 Feb 2021 22:29:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id D30336091B; Thu, 4 Feb 2021 03:29:35 +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 9C61777BE9 for ; Thu, 4 Feb 2021 03:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409597; 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=aJpd3Gy8TfE8UU4wt0M2j/o5AZNVl5M30MB1TgQJmd1l0ay49aPEplkX+E1/voiIP6R6CC LOsoogek4fbhwtYG4/I4NZQV5WzEDgSIEEYHPFLcZat4g2YCbY7DePUNMnp5OS2o7F32du aJOKEu2c0gb/BqxQ94DI0G58smf5uQ4= X-MC-Unique: -HPWXXUPP3a3o4VYNtHlKw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 15/21] security: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:11 -0500 Message-Id: <20210204032917.162962-16-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409583; cv=none; d=zohomail.com; s=zohoarc; b=k6UwmgWkMp8f2Zy7tmnxCbuxJhb7u7Npb1/797uInr7v02sspMISjFV3lm20nFlhiaqaVbhBUQ8EJ3bfqznZDCi+GWGuxCJEaU28U/XB9tUVwzwx892jN0DJ2savFgIX42Xut8jb5pEKJJJsGggV94GFDCTRfkhP+kNxB/aMihE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409583; 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=YgiSpAXU7rtwcrBtOdFIlD9BA20KAtoHb/nByEOrfeFAuQWCkrWky5f6nZoGsJF7bNYCmCUDqmIfH3Z21KQrgdTKqpYoGjrKtdVV7BmjaCiHIFchdbHA66quetAzchc5ZrbmutIN8I1w+uheMTFtOE6EjqFwS7SxiOgj7dBXXls= 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 1612409583311467.61108860759214; Wed, 3 Feb 2021 19:33:03 -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-411-VVLHJtwNMICN1qxopJEExA-1; Wed, 03 Feb 2021 22:33:00 -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 A20708030C0; Thu, 4 Feb 2021 03:32:54 +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 81F725D9EF; Thu, 4 Feb 2021 03:32:54 +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 4AA6D5808C; Thu, 4 Feb 2021 03:32:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TaPl031610 for ; Wed, 3 Feb 2021 22:29:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 36340779FB; Thu, 4 Feb 2021 03:29:36 +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 005C56091B for ; Thu, 4 Feb 2021 03:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409582; 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=ChCaWX4eqBfPJI8bVRSEvkSltIgaFZ69UJtC674NYzLi6txFBrlWUfEQa2fdgb0iaqyCN4 i3T+iI49dZopU3M4ebFNyVSXHvn3uxK9iRFqrQt93KB/d60NxqdfCzmDdOynxwVD5j7lTO +0jp66id4cS1Kz8c1OzhoMc3//h0fVc= X-MC-Unique: VVLHJtwNMICN1qxopJEExA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 16/21] tools: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:12 -0500 Message-Id: <20210204032917.162962-17-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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 --- 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 Sun May 5 15:01:05 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=1612409585; cv=none; d=zohomail.com; s=zohoarc; b=mzIpaWqa7WF+m4y8Xi4AfFdSp/lkxFmqUJHP9MLD/Diviv/8pB9mCfJ99trHIYG2iPbp/JHQVKpSE3K16T0/J2ahg8AisSXE+0fglRmljimGjC3MGDmpqwzdbQpDpfTZMFnFVplaSMGP6YxSn+K1lwbOwSxdnp4g+HARP3hfx4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409585; 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=jkGideHPtgVubV42YnooF8O7GmsK7PV2bIXGuc5B7gMG09Uxk1fHAWddDvryI+IRI9Pckh7H6XmmeYy9yHyZnJTT0xMOQDenq1y+j5LFN1nAyRPwj8MKzjFOn6U1NOO4bpbC47B6J3lugeWVzlm+Fn0UyA76sn2SNPtlMgsJNJQ= 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 1612409585460264.0551859844777; Wed, 3 Feb 2021 19:33:05 -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-564-qwqUC8BqOQeVkq21KI-YcA-1; Wed, 03 Feb 2021 22:33:02 -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 7284080196A; Thu, 4 Feb 2021 03:32:57 +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 4C2EE101E817; Thu, 4 Feb 2021 03:32:57 +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 19AF958090; Thu, 4 Feb 2021 03:32:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TaQC031618 for ; Wed, 3 Feb 2021 22:29:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8CBFB779FB; Thu, 4 Feb 2021 03:29:36 +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 57BF76091B for ; Thu, 4 Feb 2021 03:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409584; 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=QU6NBzwP6fkcxtO7llHn0MDeubZGiswpY8kG9J+mY08a88uHTIVs09ZahZpt5xKSZQSaj/ V+8OceYMSdYladKpfvzA4cXsFU+yG9UsfvzQdAoKxnrc8ykH4hlrDFYOlP2Ri5+8OKfTDS t3cDmkzqed0oE0JvIyh6hvNDA8qmS00= X-MC-Unique: qwqUC8BqOQeVkq21KI-YcA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 17/21] tests: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:13 -0500 Message-Id: <20210204032917.162962-18-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- tests/nodedevmdevctltest.c | 4 ++-- tests/nwfilterxml2firewalltest.c | 2 +- tests/qemuhotplugtest.c | 12 ++++++------ tests/qemumonitortestutils.c | 28 ++++++++++++++-------------- tests/virnetdaemontest.c | 2 +- tests/virnetserverclienttest.c | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index dab4b487b9..1bad65549b 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -152,8 +152,8 @@ nodedevTestDriverFree(virNodeDeviceDriverStatePtr drv) virNodeDeviceObjListFree(drv->devs); virCondDestroy(&drv->initCond); virMutexDestroy(&drv->lock); - VIR_FREE(drv->stateDir); - VIR_FREE(drv); + g_free(drv->stateDir); + g_free(drv); } =20 /* Add a fake root 'computer' device */ diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewallt= est.c index 0901250aaf..3e2ab0b0ba 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -174,7 +174,7 @@ virNWFilterRuleInstFree(virNWFilterRuleInstPtr inst) return; =20 virHashFree(inst->vars); - VIR_FREE(inst); + g_free(inst); } =20 =20 diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 776fb019f3..df5c9c9059 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -383,12 +383,12 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuD= ata *data) if (!data) return; =20 - VIR_FREE(data->file_xml_dom); - VIR_FREE(data->file_xml_res_live); - VIR_FREE(data->file_xml_res_conf); - VIR_FREE(data->file_json_monitor); + g_free(data->file_xml_dom); + g_free(data->file_xml_res_live); + g_free(data->file_xml_res_conf); + g_free(data->file_json_monitor); =20 - VIR_FREE(data->xml_dom); + g_free(data->xml_dom); =20 if (data->vm) { priv =3D data->vm->privateData; @@ -402,7 +402,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuDat= a *data) virObjectLock(mon); qemuMonitorTestFree(data->mon); } - VIR_FREE(data); + g_free(data); } =20 =20 diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index c4f7082655..ae3fcf9311 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -99,7 +99,7 @@ qemuMonitorTestItemFree(qemuMonitorTestItemPtr item) if (item->freecb) (item->freecb)(item->opaque); =20 - VIR_FREE(item); + g_free(item); } =20 =20 @@ -423,8 +423,8 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) if (timer !=3D -1) virEventRemoveTimeout(timer); =20 - VIR_FREE(test->incoming); - VIR_FREE(test->outgoing); + g_free(test->incoming); + g_free(test->outgoing); =20 for (i =3D 0; i < test->nitems; i++) { if (!test->allowUnusedCommands) { @@ -435,12 +435,12 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) =20 qemuMonitorTestItemFree(test->items[i]); } - VIR_FREE(test->items); + g_free(test->items); =20 if (test->tmpdir && rmdir(test->tmpdir) < 0) VIR_WARN("Failed to remove tempdir: %s", g_strerror(errno)); =20 - VIR_FREE(test->tmpdir); + g_free(test->tmpdir); =20 if (!test->allowUnusedCommands && test->nitems !=3D 0) { @@ -448,7 +448,7 @@ qemuMonitorTestFree(qemuMonitorTestPtr test) } =20 virMutexDestroy(&test->lock); - VIR_FREE(test); + g_free(test); } =20 =20 @@ -518,16 +518,16 @@ qemuMonitorTestHandlerDataFree(void *opaque) return; =20 for (i =3D 0; i < data->nargs; i++) { - VIR_FREE(data->args[i].argname); - VIR_FREE(data->args[i].argval); + g_free(data->args[i].argname); + g_free(data->args[i].argval); } =20 - VIR_FREE(data->command_name); - VIR_FREE(data->cmderr); - VIR_FREE(data->response); - VIR_FREE(data->args); - VIR_FREE(data->expectArgs); - VIR_FREE(data); + g_free(data->command_name); + g_free(data->cmderr); + g_free(data->response); + g_free(data->args); + g_free(data->expectArgs); + g_free(data); } =20 =20 diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index a20f351f93..fb40fe9b80 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -76,7 +76,7 @@ testClientNewPostExec(virNetServerClientPtr client, static void testClientFree(void *opaque) { - VIR_FREE(opaque); + g_free(opaque); } =20 =20 diff --git a/tests/virnetserverclienttest.c b/tests/virnetserverclienttest.c index a4341c1641..959100ec66 100644 --- a/tests/virnetserverclienttest.c +++ b/tests/virnetserverclienttest.c @@ -41,7 +41,7 @@ testClientNew(virNetServerClientPtr client G_GNUC_UNUSED, static void testClientFree(void *opaque) { - VIR_FREE(opaque); + g_free(opaque); } =20 static int testIdentity(const void *opaque G_GNUC_UNUSED) --=20 2.29.2 From nobody Sun May 5 15:01:05 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=1612409562; cv=none; d=zohomail.com; s=zohoarc; b=OHy93oHwLDduVadteg383SxW3bOD59YV50U9SDwXL3tUVXLQcC3ojwphLwD2vqcpDo9pP55ErSFFb0ZfmxWNbL05TE9lSvsP9e8CTCJyYmPr7C+oBmSYqsLtwGPXk6QM1yUhmqSyhdGcMY0X8dHEC8tKD1rABluriSaonjpSU/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409562; 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=YGSDM4ob9gUZWPCxJobSZ/+WDOicteCcY6wTpP3m0MiSpUqhaFxEesKFIFq4FTbAO2Pn0umU5z7bDNnA4+i2UhYVzPOx8FlvsTHa0Xni/7I4QvHjBIs+e7NXfnTnqDRNJ2KrGdSghHZnvYh2IJXpiIqndn4CqjGi+2mXoFC2jpk= 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 1612409562051762.9602043425087; Wed, 3 Feb 2021 19:32:42 -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-582-diNzvNgzOpqXYc6fLOxeSA-1; Wed, 03 Feb 2021 22:32:38 -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 B846210066EF; Thu, 4 Feb 2021 03:32:33 +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 980B971C86; Thu, 4 Feb 2021 03:32:33 +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 5E34C18089E0; Thu, 4 Feb 2021 03:32:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143Ta2Y031629 for ; Wed, 3 Feb 2021 22:29:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id E5ECC779FB; Thu, 4 Feb 2021 03:29:36 +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 B08FB6091B for ; Thu, 4 Feb 2021 03:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409561; 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=eUvPMowIWBoHFL7eZUM1LBfvRJ6X+ax0Zw6pV8oXjqnj/KVrduIlTGNgYvOvYfNsbXCZJ+ 2aLL9L5LKjOUrgCU2BdXmN6uqLOXhbouKQvujk/RbCwI+hiZg6bgR9wMRgezw1I1yJ90YS Ga8W/SKvcBlNLjhYj/ppdBJdVVtEfNc= X-MC-Unique: diNzvNgzOpqXYc6fLOxeSA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 18/21] storage: replace VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:14 -0500 Message-Id: <20210204032917.162962-19-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" Signed-off-by: Laine Stump --- 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 Sun May 5 15:01:05 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=1612409565; cv=none; d=zohomail.com; s=zohoarc; b=Sg5FfL0pNRne2gm72PpSKzBSDCopA8BHl7y0b3uifei+9rgxax5r4vFgTwHqJQPFDvJYjO+1xTP5gUIBZCE7k3G/RyE7DLerASbztDKSaLdzgsHPj1AVT6MTfAHJUQeqldE1cxzlCicF+auxnvyp6xtT1TEgF4KGRcJbqvRzNjU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409565; 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=Lp1x1O3O/FjKRmZVy+iDHWBDnKqQIqnRnrWBJfaKq9NTTIZVFwL8KUQBM3PzPGc7cyHsTlc6wCHZ2isUehGBrnbgALWgIryBwGfUZxezxCRPeF7G0L8P0xp6CGXRensVzROmioAJ5wiY4u3zCAlaysT6DgJKM6kU2a01KHTHJWE= 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 1612409565048800.3186863887386; Wed, 3 Feb 2021 19:32:45 -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-384-Ydbq_fs-Nzec9kCTDylhdg-1; Wed, 03 Feb 2021 22:32:42 -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 A942E10066F5; Thu, 4 Feb 2021 03:32:36 +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 7B38BE16B; Thu, 4 Feb 2021 03:32:36 +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 118AA1800232; Thu, 4 Feb 2021 03:32:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143Tb5I031637 for ; Wed, 3 Feb 2021 22:29:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 487C76091B; Thu, 4 Feb 2021 03:29:37 +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 12AD577BE9 for ; Thu, 4 Feb 2021 03:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409564; 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=SUUasjHOsUsxE2UlhO5APvObbitrFgLCPRjp5qIYhc6DPReqjFSuR07Fk5OnkQtaUhE4uN RQQbMDujkbe9qlfAdOd49aC6Zk5NtllXiyI0ugr5WXu8l2S3uY08B4xFY96nrlh6yCoi8R WkUKgqczVWnHJEcjry5FV3cAMfi0Sms= X-MC-Unique: Ydbq_fs-Nzec9kCTDylhdg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 19/21] libvirtd: replace straggler VIR_FREE with g_free in all vir*Free() functions Date: Wed, 3 Feb 2021 22:29:15 -0500 Message-Id: <20210204032917.162962-20-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.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 --- 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 Sun May 5 15:01:05 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=1612409764; cv=none; d=zohomail.com; s=zohoarc; b=egPdN5USK7fSmVcoP6r81p5Ml5JkdH8w7oOWb3nYohBcerbPRzhbpsiqhJ0dl/nht6DxJg8wIkojKCAiSh2swslI4w4qNiTV4UW/VbW0p0XtzWwYFkecY6dk4gM6xYJrOyXkWlvCocnG33RdVH1bSEpiEBdqICMHjAcqIA2XHGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409764; 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=S6ayFupn/leY7Sx1HlBwBWdq1mZYNYAzieS9vMel9c5G0MzeBIYOKMe6pCu9R0oXDIvnx1EUs6TxKUupPGyw/WUPk/VZJrAbBD00XlPVEsM3t6XWZs0eadXICwrI92Wac5v/iqfJhRnHAEeiOarXy8kBNUHG5miFUnFc8gS2s6M= 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 1612409764625258.5091905254093; Wed, 3 Feb 2021 19:36: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-510-AOXYXMP2MzOhS00HAUvzeQ-1; Wed, 03 Feb 2021 22:32:45 -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 3611D801966; Thu, 4 Feb 2021 03:32:39 +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 1629E60C5F; Thu, 4 Feb 2021 03:32:39 +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 D4A2618077BA; Thu, 4 Feb 2021 03:32:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143Tbrv031651 for ; Wed, 3 Feb 2021 22:29:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9EF0A779FB; Thu, 4 Feb 2021 03:29:37 +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 695D26091B for ; Thu, 4 Feb 2021 03:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409763; 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=Oa2MJ7y6ZeNOG1VUPkiAGE4iV8o6ggWb8ooJWfdC3GLdqhb7QKXi1rl4eoyzybfoTeNrTa PuZP7OEnecFaWuGsOyDkE1RENabjLW/Jo+vBu3jkd1FpBVlMizoK5ARDjceDlRc9m9lrbL 1lXyph4v4iKivsxl1DUjUNFAAy8N+KM= X-MC-Unique: AOXYXMP2MzOhS00HAUvzeQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 20/21] util: rename two *Free() functions while changing VIR_FREE to g_free Date: Wed, 3 Feb 2021 22:29:16 -0500 Message-Id: <20210204032917.162962-21-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" 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 --- 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 Sun May 5 15:01:05 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=1612409662; cv=none; d=zohomail.com; s=zohoarc; b=T7ITRgKQaglt6ws73srtnqIB+G9jLMHBY3T4lO0O75DJn8x5/M+bXFGnfyMYDoAEGl+j5Zi6vUH6JqGtAzoKjqnwCS9coLUm+Fa/Jlk/tSB8Iz44U8FhbiulR9mMQHz7g7xKK4j13oS87wiAi2p4ykLPgDSDwH1I1i0kSLfgEqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612409662; 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=Va+XvvIDPzcJvMDjR5RSDCSPlj7d+BX/PqICTBrr3F/NzjGM3KQb1unEPkChBLSgS9WSnhvL+FkMcNKMyr6YsF0txOrYLbTLNTmItMGSq973f0PoAOOa9miWMRL8lG8VFM+A8FMqVKsNy9xyMIIDDtJLlwuHDO692DtivXOyCkI= 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 1612409662158833.7536096064928; Wed, 3 Feb 2021 19:34: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-241-36u-OOnrMsKcEI6oF_qNyQ-1; Wed, 03 Feb 2021 22:33:06 -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 3C2C9801964; Thu, 4 Feb 2021 03:33:00 +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 1678A5B6BF; Thu, 4 Feb 2021 03:33: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 D16AC1809C91; Thu, 4 Feb 2021 03:32:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1143TcYe031661 for ; Wed, 3 Feb 2021 22:29:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 01DAC779FB; Thu, 4 Feb 2021 03:29:38 +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 C01DF6091B for ; Thu, 4 Feb 2021 03:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612409661; 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=FnOIEmDKklzyYcfC/Od86jFU7PVofJVoh6SUvM8aVOaFxNUS/GvMNdotA3AgCIh4yYzrwN agrBQovusdnZJGMalogaFrg4xke60fz8dGktXfAtQe5N7qd/xi+RXHNncknUytrQkHT/8M j1Q1aUBpffj0otevERskHJliCZpnZ1s= X-MC-Unique: 36u-OOnrMsKcEI6oF_qNyQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 21/21] rpc: rename virNetSessionAuthMethodsFree to virNetSessionAuthMethodsClear Date: Wed, 3 Feb 2021 22:29:17 -0500 Message-Id: <20210204032917.162962-22-laine@redhat.com> In-Reply-To: <20210204032917.162962-1-laine@redhat.com> References: <20210204032917.162962-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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" 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 --- 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