From nobody Sun Apr 28 21:43:06 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=1612413532; cv=none; d=zohomail.com; s=zohoarc; b=iCLZ0OhMSI8iXQWvNZiNrqlHU7YGjeTvnzx0UxqJ1JLN4TUmdd/vvZES3eAgE+oykaVN8ftsKJ4kw0WeOJHpH/QRzQmxnHuSS+kJ+6CNnk8UQXyDF9ENrkI2gmPMiSLvIWGufMq3soBuFEGmfk6Jy66O6Y5NfH1E/k0aqZKgmsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413532; 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=hhb5ReKXg6WSlhujTyUKLM/gECNYM6zLzgtNEfRW3jo=; b=LVgCl1EUShLe2BxN48PsRFq3FidrBfFOFheNTZKwTNm7jrmF6C5zpftat8pz6qTJ6aenbc/BKj90ipkczOfyGeXuisFNc+fEAx50nkZOxnOyVEPyB7XP1HmJigQsNbmXKLJUtJ/WmUVlpU0XSiv77nHb4vDTHV+08BTQr8GGOa0= 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 1612413532221297.77084192598306; Wed, 3 Feb 2021 20:38:52 -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-316-X0DKvDL5PliRDLff4QdBkg-1; Wed, 03 Feb 2021 23:38:49 -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 B5DD3801961; Thu, 4 Feb 2021 04:38: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 9666471C82; Thu, 4 Feb 2021 04:38:42 +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 1F908996F; Thu, 4 Feb 2021 04:38:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144ccM3011279 for ; Wed, 3 Feb 2021 23:38:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 62986100AE4D; Thu, 4 Feb 2021 04:38: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 2D03B100763D for ; Thu, 4 Feb 2021 04:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413531; 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=hhb5ReKXg6WSlhujTyUKLM/gECNYM6zLzgtNEfRW3jo=; b=NkhEK19LMPedI/S2AzfEVmSpXJvUsgKU+0T3cBAFIb7Is3okPBWBgoJxDffP66ZIusxuLx 2D/ZvDVe8QB92Zt8vrpzCHMMKZywzZ42oahLQEkpdGNsodE4DmJsrSRToJ/3bTObmH6NGd KmBJO/E3Sr6cw6jptgIeiT2ocoQ8XlE= X-MC-Unique: X0DKvDL5PliRDLff4QdBkg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 01/15] conf: simplify virDomainCapsDispose() Date: Wed, 3 Feb 2021 23:38:20 -0500 Message-Id: <20210204043834.191994-2-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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" virDomainCapsDispose() was the only caller of virDomainCapsStringValuesFree(), which 1) didn't actually free the object it was called with, but only cleared it, making it less mechanical to convert from VIR_FREE to g_free (since it's not immediately obvious from looking at virDomainCapsStringValuesFree() that the pointers being cleared will never again be used). We could have renamed the function to virDomainCapsStringValuesClear() to side-step the confusion of what the function actually does, but that would just make the upcoming switch from VIR_FREE to g_free require more thought. But since there is only a single caller to the function, and it is a vir*Dispose() function (indicating that the object containing the virDomainCapsStringValues is going to be freed immediately after the function finishes), and thus VIR_FREE() *could* be safely replaced by g_free()), we instead just move the contents of virDomainCapsStringValuesFree() into virDomainCapsDispose() (and *that* function will be trivially converted in an upcoming "mechanical" patch). Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/conf/domain_capabilities.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 837c571b45..407cf0348a 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -65,20 +65,6 @@ static int virDomainCapsOnceInit(void) VIR_ONCE_GLOBAL_INIT(virDomainCaps); =20 =20 -static void -virDomainCapsStringValuesFree(virDomainCapsStringValuesPtr values) -{ - size_t i; - - if (!values || !values->values) - return; - - for (i =3D 0; i < values->nvalues; i++) - VIR_FREE(values->values[i]); - VIR_FREE(values->values); -} - - void virSEVCapabilitiesFree(virSEVCapability *cap) { @@ -95,6 +81,8 @@ static void virDomainCapsDispose(void *obj) { virDomainCapsPtr caps =3D obj; + virDomainCapsStringValuesPtr values; + size_t i; =20 VIR_FREE(caps->path); VIR_FREE(caps->machine); @@ -102,7 +90,10 @@ virDomainCapsDispose(void *obj) virCPUDefFree(caps->cpu.hostModel); virSEVCapabilitiesFree(caps->sev); =20 - virDomainCapsStringValuesFree(&caps->os.loader.values); + values =3D &caps->os.loader.values; + for (i =3D 0; i < values->nvalues; i++) + VIR_FREE(values->values[i]); + VIR_FREE(values->values); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413533; cv=none; d=zohomail.com; s=zohoarc; b=jUSXiVfSDozjer3H55f2TDs/Vx8OHNZXNu02dD5Nw98ZLig7496SbY8s2wE0xmoRsM/a21gkMZl/AiQuk/H+xUpuqoeCPxe41wBcPMObWiPzPXXujOktdoCKGpy+TOKamZGozI3xCI2wcAbajAV/AqhIFq4708rXzYDDadz99uI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413533; 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=lDTPQLxLvA8Tg5MCkXoHWatwmwJaF4ccKZjZqrB7Ujc=; b=bjsDbjzW1LTuaGqDZzgcr8C3UT2C/qMbgRobyeEQtsVAZsNGRMvR0kGheiKl/SoEHycolxTFPCvZVN5C3GiOSxWhiBXcxsa0W07IBVkf7agU0sdRb+CPTa3kbWoAZ1K/iJKrgkmjs7sp4dQlNgk4MZqSmqdPTygYwAUp6SabnEg= 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 1612413533350636.662757458619; Wed, 3 Feb 2021 20:38:53 -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-601-2XTX62stOUKSwrGnbk5YNg-1; Wed, 03 Feb 2021 23:38:50 -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 D7758AFA81; Thu, 4 Feb 2021 04:38: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 8F5A45D9C0; Thu, 4 Feb 2021 04:38:42 +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 F23924EEEC; Thu, 4 Feb 2021 04:38:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144ccnO011284 for ; Wed, 3 Feb 2021 23:38:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id B9D7B100AE4D; Thu, 4 Feb 2021 04:38: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 849C0100763D for ; Thu, 4 Feb 2021 04:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413532; 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=lDTPQLxLvA8Tg5MCkXoHWatwmwJaF4ccKZjZqrB7Ujc=; b=bt3mY/bh9WROjsxv0857qynzs9SEgFVVpRiYAxD2PU6QoDTlC205059oHSWD1g/rx21gTs HgUOEMOdfIzhy/SY9dxqj36SQ8vSNJourdLQfWYyF14Q/5g1Sh0eSEiKYREs4IPdY2vkJj eZTolHNEsB5ruYAVBbh2TKqx+MFYfSk= X-MC-Unique: 2XTX62stOUKSwrGnbk5YNg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 02/15] rpc: eliminate static function virNetLibsshSessionAuthMethodsFree() Date: Wed, 3 Feb 2021 23:38:21 -0500 Message-Id: <20210204043834.191994-3-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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" This function is only called from one place, and has, well... not a *misleading* name, but it doesn't fit the standard frame of functions that end in "Free" (it doesn't actually free the object pointed to by its argument, but frees *some parts* of the content of the object). Rather than try to think up an appropriate name, let's just move the meat of this function into its one and only caller, virNetLibsshSessionDispose(), which will allow us to convert its VIR_FREEs into g_free in a future patch. Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/rpc/virnetlibsshsession.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 76934c7c0b..48ef914c70 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -108,26 +108,12 @@ struct _virNetLibsshSession { size_t bufStart; }; =20 -static void -virNetLibsshSessionAuthMethodsFree(virNetLibsshSessionPtr sess) -{ - size_t i; - - for (i =3D 0; i < sess->nauths; i++) { - virSecureEraseString(sess->auths[i]->password); - g_free(sess->auths[i]->password); - VIR_FREE(sess->auths[i]->filename); - VIR_FREE(sess->auths[i]); - } - - VIR_FREE(sess->auths); - sess->nauths =3D 0; -} - static void virNetLibsshSessionDispose(void *obj) { virNetLibsshSessionPtr sess =3D obj; + size_t i; + VIR_DEBUG("sess=3D0x%p", sess); =20 if (!sess) @@ -144,7 +130,14 @@ virNetLibsshSessionDispose(void *obj) ssh_free(sess->session); } =20 - virNetLibsshSessionAuthMethodsFree(sess); + for (i =3D 0; i < sess->nauths; i++) { + virSecureEraseString(sess->auths[i]->password); + VIR_FREE(sess->auths[i]->password); + VIR_FREE(sess->auths[i]->filename); + VIR_FREE(sess->auths[i]); + } + + VIR_FREE(sess->auths); =20 VIR_FREE(sess->channelCommand); VIR_FREE(sess->hostname); --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413540; cv=none; d=zohomail.com; s=zohoarc; b=e9LhHNWtIW7gaxdnjDZl5GekRqdMeNbA9VoM4O6fap1e2Z0PTM1tIsepytkbEqjNpo/6/04KYvvxfF4z3l28dMIBm8K+yc1HUw3Dq/hqL0TUy2Cc5YOgIi0FcXQUY0v7SoKY3KtHqD5pccJvvxQ1z+3mUUeCOGyN3Q1jr+fQBfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413540; 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=MnHn+AwpWxtWy+VpqtQ7pp2IpDLKu+eLODZQmA80FFw=; b=Y7UPOPbXGvjU9T+zZpNnGuBde5fBf5PFvnC81jgfh1nhgqWZcgT8kkI+qqrzAt9SZ8Li2kzrWbcUpL0Uwy/QUpQCofF1/LuufyLO36YGEWjSgj6VVxpMZy/6nlPYusCmFT9YlQgl3j6uO3Odj+GVqL2G/pbKtNKipihHgaE4/yI= 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 1612413540136473.9414761139361; Wed, 3 Feb 2021 20:39:00 -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-250-JVauwBmsPXSNS4quM1LjuA-1; Wed, 03 Feb 2021 23:38:56 -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 4A00F8030BF; Thu, 4 Feb 2021 04:38:51 +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 2276718E41; Thu, 4 Feb 2021 04:38: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 DF8C61809C8F; Thu, 4 Feb 2021 04:38:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cd0e011290 for ; Wed, 3 Feb 2021 23:38:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1DA9E100763D; Thu, 4 Feb 2021 04:38:39 +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 DB5A8101E590 for ; Thu, 4 Feb 2021 04:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413539; 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=MnHn+AwpWxtWy+VpqtQ7pp2IpDLKu+eLODZQmA80FFw=; b=RtUDDLwMMaHjQHOVd8TtFQ+ficIEmm3ophkMwPuy78VljcfUR0VqpzOwwH8Lsj0RmJE5PE cHtTEduqLRiOiI0EFXeh18N81nc78RllXBwTk4IsPabd1IkDDhpw9+12A40FU/FctdP7r8 CEgeso19U3m665aisxec2AotDJloFJI= X-MC-Unique: JVauwBmsPXSNS4quM1LjuA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 03/15] bhyve: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:22 -0500 Message-Id: <20210204043834.191994-4-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/bhyve/bhyve_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_conf.c b/src/bhyve/bhyve_conf.c index 9012eb8b5f..0f60aac9a0 100644 --- a/src/bhyve/bhyve_conf.c +++ b/src/bhyve/bhyve_conf.c @@ -97,7 +97,7 @@ virBhyveDriverConfigDispose(void *obj) { virBhyveDriverConfigPtr cfg =3D obj; =20 - VIR_FREE(cfg->firmwareDir); + g_free(cfg->firmwareDir); } =20 void --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413541; cv=none; d=zohomail.com; s=zohoarc; b=aZpZWPr9RlEwsc4hOT6jEn8kkdS3YCCyg2Q52moRtLTykSUU0Te7v478kyhVFeAycNEfXcTDMS/uCGylSGzVfE32bp+p3VrcphyefeK5DyWgJ82Z4866Fw2vHaTsKS1ICC+SeNi+k4H2KZNR9nhO8mRJXVjYFHkgE3l0sp0ymSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413541; 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=Kv/vjGapqvGk8ULlfrl0Chtwirbo67eW3kI9QfXooW0=; b=JiogiD22FyzwMyAqhzmV6XezZDceDxv8jeeH97y57RYuebCrRd+sh8JvmHDRUIZ5jrvEIRco3rbbLSifHvHxLorYQ9WMbvj4uBPQZv4J29t/i2FbGAHjsyiLDo4abibmM/9hmLn96H+tUhGWE091QtzQ/USgZRWNmP46FsjAJDk= 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 1612413541363875.8795920131441; Wed, 3 Feb 2021 20:39:01 -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-449-I97EkY1iPjCx2zwSIy4VMg-1; Wed, 03 Feb 2021 23:38:58 -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 6B2FE107ACE4; Thu, 4 Feb 2021 04:38:52 +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 4CD295D9C0; Thu, 4 Feb 2021 04:38:52 +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 185A31809C8F; Thu, 4 Feb 2021 04:38:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cdxC011295 for ; Wed, 3 Feb 2021 23:38:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 74C22100AE4D; Thu, 4 Feb 2021 04:38:39 +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 3FDA2100763D for ; Thu, 4 Feb 2021 04:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413540; 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=Kv/vjGapqvGk8ULlfrl0Chtwirbo67eW3kI9QfXooW0=; b=WsvGrXLQ6D7FpU2EgUnL5m86mG4FGA76N/wH/ibdPCm7fzdjrOVOKMsRfrf/48HJQScdoO ekGwna1QH87Pgv4TTT+pNU4KTdTaPXhpDC5H3QFzHAMZ73xB1bzaR/oBTAqSvbM9SdMFN8 SOBgQxT042JlzC34FGYIjkemJzvmLgQ= X-MC-Unique: I97EkY1iPjCx2zwSIy4VMg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 04/15] libxl: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:23 -0500 Message-Id: <20210204043834.191994-5-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/libxl/libxl_conf.c | 20 ++++++++++---------- src/libxl/libxl_migration.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index de0fd66842..37a2c2e3cd 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -76,16 +76,16 @@ libxlDriverConfigDispose(void *obj) if (cfg->logger) libxlLoggerFree(cfg->logger); =20 - VIR_FREE(cfg->configBaseDir); - VIR_FREE(cfg->configDir); - VIR_FREE(cfg->autostartDir); - VIR_FREE(cfg->logDir); - VIR_FREE(cfg->stateDir); - VIR_FREE(cfg->libDir); - VIR_FREE(cfg->saveDir); - VIR_FREE(cfg->autoDumpDir); - VIR_FREE(cfg->lockManagerName); - VIR_FREE(cfg->channelDir); + g_free(cfg->configBaseDir); + g_free(cfg->configDir); + g_free(cfg->autostartDir); + g_free(cfg->logDir); + g_free(cfg->stateDir); + g_free(cfg->libDir); + g_free(cfg->saveDir); + g_free(cfg->autoDumpDir); + g_free(cfg->lockManagerName); + g_free(cfg->channelDir); virFirmwareFreeList(cfg->firmwares, cfg->nfirmwares); } =20 diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 72b6cb32cb..c56fdd98ab 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -228,7 +228,7 @@ libxlMigrationDstArgsDispose(void *obj) libxlMigrationDstArgs *args =3D obj; =20 libxlMigrationCookieFree(args->migcookie); - VIR_FREE(args->socks); + g_free(args->socks); virObjectUnref(args->conn); virObjectUnref(args->vm); } --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413542; cv=none; d=zohomail.com; s=zohoarc; b=Va3PaCSGApkhK6ldxAjthQwqT0tNicsx5xjsee4mV1hdw0iYxrG7/PxbsKwEzKM3zYyyrpOa7o+ANetmSsfbj51fEDA7rAMGd92+4AjxycuekwK8et4UPm3B4rOEEaXWDgJfxGqMyyM6EwEZlVxsnVtg/9PY6orMMpNV2fabCkk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413542; 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=6FJPRDnxEpVwz1gGAFZBBUQ6UcUybBJfbHvgY4gf+XQ=; b=cqRjKkXu9dtzlISAJVHjA0lh2iI2dZ1gqXlMbOrBVoaAvallCNVBZSqhKK6XrS8UNDWr8Svz1Iho0GpOEnBrEicvuHObW5GpYolRWYvvXLuVaNLaAHwr/uEnrsoiql8A+BNTuuO9Zp/x5giBG+UZQ2ULBRt5qcPx5tG1UjSwHEE= 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 1612413542534543.2134440112025; Wed, 3 Feb 2021 20:39:02 -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-160-30MOMyvLN7OQ4oWPG5P5yw-1; Wed, 03 Feb 2021 23:38:58 -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 B28E0AFA8A; Thu, 4 Feb 2021 04:38:53 +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 8D1B05FC3A; Thu, 4 Feb 2021 04:38:53 +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 586211809C92; Thu, 4 Feb 2021 04:38:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cdAJ011303 for ; Wed, 3 Feb 2021 23:38:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id CD74A100763D; Thu, 4 Feb 2021 04:38:39 +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 97CC9101E581 for ; Thu, 4 Feb 2021 04:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413541; 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=6FJPRDnxEpVwz1gGAFZBBUQ6UcUybBJfbHvgY4gf+XQ=; b=dboW64xUIU2jgKCOa86GvS6ERi47r/3mG7U/ICR3zXBht4aC8b72muGdDXVaWPe5WwCBbf MYidFu3CSUPf/aQCKYjIyNGKJhJ9Phnfzxscdi+8X0UfuDCSBC5KskKUpKjWi/WphvP/ps tnPo3Zpt5UZu8q1DRxOx53z8JMS2W9k= X-MC-Unique: 30MOMyvLN7OQ4oWPG5P5yw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 05/15] qemu: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:24 -0500 Message-Id: <20210204043834.191994-6-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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 Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_agent.c | 2 +- src/qemu/qemu_capabilities.c | 10 +-- src/qemu/qemu_conf.c | 122 +++++++++++++++++------------------ src/qemu/qemu_domain.c | 10 +-- src/qemu/qemu_monitor.c | 4 +- 5 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index af0397e6e2..51cc00c618 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -177,7 +177,7 @@ static void qemuAgentDispose(void *obj) if (agent->cb && agent->cb->destroy) (agent->cb->destroy)(agent, agent->vm); virCondDestroy(&agent->notify); - VIR_FREE(agent->buffer); + g_free(agent->buffer); g_main_context_unref(agent->context); virResetError(&agent->lastError); } diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c57864f602..d41b4a4753 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1982,12 +1982,12 @@ void virQEMUCapsDispose(void *obj) =20 virBitmapFree(qemuCaps->flags); =20 - VIR_FREE(qemuCaps->package); - VIR_FREE(qemuCaps->kernelVersion); - VIR_FREE(qemuCaps->binary); - VIR_FREE(qemuCaps->hostCPUSignature); + g_free(qemuCaps->package); + g_free(qemuCaps->kernelVersion); + g_free(qemuCaps->binary); + g_free(qemuCaps->hostCPUSignature); =20 - VIR_FREE(qemuCaps->gicCapabilities); + g_free(qemuCaps->gicCapabilities); =20 virSEVCapabilitiesFree(qemuCaps->sevCapabilities); =20 diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index eae94bb5a2..35d0b6515c 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -306,78 +306,78 @@ static void virQEMUDriverConfigDispose(void *obj) virBitmapFree(cfg->namespaces); =20 g_strfreev(cfg->cgroupDeviceACL); - VIR_FREE(cfg->uri); - - VIR_FREE(cfg->configBaseDir); - VIR_FREE(cfg->configDir); - VIR_FREE(cfg->autostartDir); - VIR_FREE(cfg->logDir); - VIR_FREE(cfg->swtpmLogDir); - VIR_FREE(cfg->stateDir); - VIR_FREE(cfg->swtpmStateDir); - VIR_FREE(cfg->slirpStateDir); - VIR_FREE(cfg->dbusStateDir); - - VIR_FREE(cfg->libDir); - VIR_FREE(cfg->cacheDir); - VIR_FREE(cfg->saveDir); - VIR_FREE(cfg->snapshotDir); - VIR_FREE(cfg->checkpointDir); - VIR_FREE(cfg->channelTargetDir); - VIR_FREE(cfg->nvramDir); - - VIR_FREE(cfg->defaultTLSx509certdir); - VIR_FREE(cfg->defaultTLSx509secretUUID); - - VIR_FREE(cfg->vncTLSx509certdir); - VIR_FREE(cfg->vncTLSx509secretUUID); - VIR_FREE(cfg->vncListen); - VIR_FREE(cfg->vncPassword); - VIR_FREE(cfg->vncSASLdir); - - VIR_FREE(cfg->spiceTLSx509certdir); - VIR_FREE(cfg->spiceListen); - VIR_FREE(cfg->spicePassword); - VIR_FREE(cfg->spiceSASLdir); - - VIR_FREE(cfg->chardevTLSx509certdir); - VIR_FREE(cfg->chardevTLSx509secretUUID); - - VIR_FREE(cfg->vxhsTLSx509certdir); - VIR_FREE(cfg->vxhsTLSx509secretUUID); - - VIR_FREE(cfg->nbdTLSx509certdir); - VIR_FREE(cfg->nbdTLSx509secretUUID); - - VIR_FREE(cfg->migrateTLSx509certdir); - VIR_FREE(cfg->migrateTLSx509secretUUID); - - VIR_FREE(cfg->backupTLSx509certdir); - VIR_FREE(cfg->backupTLSx509secretUUID); + g_free(cfg->uri); + + g_free(cfg->configBaseDir); + g_free(cfg->configDir); + g_free(cfg->autostartDir); + g_free(cfg->logDir); + g_free(cfg->swtpmLogDir); + g_free(cfg->stateDir); + g_free(cfg->swtpmStateDir); + g_free(cfg->slirpStateDir); + g_free(cfg->dbusStateDir); + + g_free(cfg->libDir); + g_free(cfg->cacheDir); + g_free(cfg->saveDir); + g_free(cfg->snapshotDir); + g_free(cfg->checkpointDir); + g_free(cfg->channelTargetDir); + g_free(cfg->nvramDir); + + g_free(cfg->defaultTLSx509certdir); + g_free(cfg->defaultTLSx509secretUUID); + + g_free(cfg->vncTLSx509certdir); + g_free(cfg->vncTLSx509secretUUID); + g_free(cfg->vncListen); + g_free(cfg->vncPassword); + g_free(cfg->vncSASLdir); + + g_free(cfg->spiceTLSx509certdir); + g_free(cfg->spiceListen); + g_free(cfg->spicePassword); + g_free(cfg->spiceSASLdir); + + g_free(cfg->chardevTLSx509certdir); + g_free(cfg->chardevTLSx509secretUUID); + + g_free(cfg->vxhsTLSx509certdir); + g_free(cfg->vxhsTLSx509secretUUID); + + g_free(cfg->nbdTLSx509certdir); + g_free(cfg->nbdTLSx509secretUUID); + + g_free(cfg->migrateTLSx509certdir); + g_free(cfg->migrateTLSx509secretUUID); + + g_free(cfg->backupTLSx509certdir); + g_free(cfg->backupTLSx509secretUUID); =20 while (cfg->nhugetlbfs) { cfg->nhugetlbfs--; - VIR_FREE(cfg->hugetlbfs[cfg->nhugetlbfs].mnt_dir); + g_free(cfg->hugetlbfs[cfg->nhugetlbfs].mnt_dir); } - VIR_FREE(cfg->hugetlbfs); - VIR_FREE(cfg->bridgeHelperName); - VIR_FREE(cfg->prHelperName); - VIR_FREE(cfg->slirpHelperName); - VIR_FREE(cfg->dbusDaemonName); + g_free(cfg->hugetlbfs); + g_free(cfg->bridgeHelperName); + g_free(cfg->prHelperName); + g_free(cfg->slirpHelperName); + g_free(cfg->dbusDaemonName); =20 - VIR_FREE(cfg->saveImageFormat); - VIR_FREE(cfg->dumpImageFormat); - VIR_FREE(cfg->snapshotImageFormat); - VIR_FREE(cfg->autoDumpPath); + g_free(cfg->saveImageFormat); + g_free(cfg->dumpImageFormat); + g_free(cfg->snapshotImageFormat); + g_free(cfg->autoDumpPath); =20 g_strfreev(cfg->securityDriverNames); =20 - VIR_FREE(cfg->lockManagerName); + g_free(cfg->lockManagerName); =20 virFirmwareFreeList(cfg->firmwares, cfg->nfirmwares); =20 - VIR_FREE(cfg->memoryBackingDir); - VIR_FREE(cfg->swtpmStorageDir); + g_free(cfg->memoryBackingDir); + g_free(cfg->swtpmStorageDir); =20 g_strfreev(cfg->capabilityfilters); } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6ab8a94b73..0f09e321fb 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -681,8 +681,8 @@ qemuDomainDiskPrivateDispose(void *obj) qemuDomainDiskPrivatePtr priv =3D obj; =20 virObjectUnref(priv->migrSource); - VIR_FREE(priv->qomName); - VIR_FREE(priv->nodeCopyOnRead); + g_free(priv->qomName); + g_free(priv->nodeCopyOnRead); virObjectUnref(priv->blockjob); } =20 @@ -771,8 +771,8 @@ qemuDomainVcpuPrivateDispose(void *obj) { qemuDomainVcpuPrivatePtr priv =3D obj; =20 - VIR_FREE(priv->type); - VIR_FREE(priv->alias); + g_free(priv->type); + g_free(priv->alias); virJSONValueFree(priv->props); return; } @@ -890,7 +890,7 @@ qemuDomainGraphicsPrivateDispose(void *obj) { qemuDomainGraphicsPrivatePtr priv =3D obj; =20 - VIR_FREE(priv->tlsAlias); + g_free(priv->tlsAlias); g_clear_pointer(&priv->secinfo, qemuDomainSecretInfoFree); } =20 diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2d9c9754d1..14966d4096 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -236,8 +236,8 @@ qemuMonitorDispose(void *obj) g_main_context_unref(mon->context); virResetError(&mon->lastError); virCondDestroy(&mon->notify); - VIR_FREE(mon->buffer); - VIR_FREE(mon->balloonpath); + g_free(mon->buffer); + g_free(mon->balloonpath); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413546; cv=none; d=zohomail.com; s=zohoarc; b=DvwSxQnJPWFSDpWBMP02EcW6/80JL4LIIiRattipkHJ4AxF+ca/i0yqb4f0u2YMwkdWFepfSCP+WSt9xGgXiDAXM6nOcllc5i99vj3TWXZcYA/4FJguuJWLmWVHRHXQ5o1554Dpwr8IvdgvvBVMgsjwc0Jpi4CDpimyU+XbsInw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413546; 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=GOMKFDPKlZS4re5YE2yl6BD3az63SEMQtcHRRocWiLI=; b=emssNg8u+vCw4wGwnL0tN4bCp6bqzzv+fURhiAaFvdrKUaJXcihHWK+iM6xlFS6M+vcFpp3dYJzvtJ+0gvlcNXezSlUqP7nqD1kMKEgwVQ2/f/rwE62YxUKg7oEBGoCOWPKefSbAHv1gWHK3h8xU2fP8UI8V4QCJDc3W+HPkepg= 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 1612413546265316.1442919070978; Wed, 3 Feb 2021 20:39:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-KNhJ3TXtNCOS1Z-w1yAGRw-1; Wed, 03 Feb 2021 23:39: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 759EA1020C29; Thu, 4 Feb 2021 04:38:56 +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 5172E101E66C; Thu, 4 Feb 2021 04:38:56 +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 E3B4557DFD; Thu, 4 Feb 2021 04:38:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144ceet011313 for ; Wed, 3 Feb 2021 23:38:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 35C89100AE4D; Thu, 4 Feb 2021 04:38:40 +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 008A2100763D for ; Thu, 4 Feb 2021 04:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413545; 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=GOMKFDPKlZS4re5YE2yl6BD3az63SEMQtcHRRocWiLI=; b=Keq09nANaVcVdrrDUWkKWCt4WyXp5fmdJSQfS/g0FxxBoIUl4+L7qGCA8OVernlQm2h3pT N0pBGrwwtorkoI8N4WZ/YQu1ZbxEV4rK/bNHtaUgm1ni0jJrVTIYnrAdyl8wQEae64y9NM 5b+dxnI41bAO9vPqJUO7CXo1uUGvG/E= X-MC-Unique: KNhJ3TXtNCOS1Z-w1yAGRw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 06/15] interface: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:25 -0500 Message-Id: <20210204043834.191994-7-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/interface/interface_backend_netcf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interf= ace_backend_netcf.c index df04484c59..e40a4cb108 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -84,7 +84,7 @@ virNetcfDriverStateDispose(void *obj) if (_driver->lockFD !=3D -1) virPidFileRelease(_driver->stateDir, "driver", _driver->lockFD); =20 - VIR_FREE(_driver->stateDir); + g_free(_driver->stateDir); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413543; cv=none; d=zohomail.com; s=zohoarc; b=XPtDwH1KlE3RBFWepHDFghRso+aaiDSluXO9oFRihN6GrRMF3j38riElMVe5BdF99OFxCGfeG1ovQoYZ8ViJ266tQ6H9wx5V50NCOnyuy7WYBP/kICD7s81wPT0C0cY0SQkSVuOPF11nma7Q89k0kcFJBK3zdhMmZFXIQk9DHFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413543; 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=rE1E0bwpuGn74pC6uWcxGF0HOZ4kMuJbttK998v5LFo=; b=IW8TtsP9oQ7jiJt5hdl6x5FPrOuWj3HjaQ2D0uQi9qOw5xVf/8Ni/XAJllIdx5kdtqiP0Emcwv1ZrXFfyUPV1IPnhk6y2uXA9bxxt8zPwGNQg4BMf/VkXzDoJpoX+JzWuYCBuGevhyKF6+hGPv+XDXkcCctttovgetJQgQsvrtQ= 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 161241354397211.040104539854497; Wed, 3 Feb 2021 20:39: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-515-UBTFLHVQNHqut2xa6RRX6Q-1; Wed, 03 Feb 2021 23:39:00 -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 1B29E183CD10; Thu, 4 Feb 2021 04:38:55 +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 E62DE131F5; Thu, 4 Feb 2021 04:38: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 AC47518089CC; Thu, 4 Feb 2021 04:38:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cefj011323 for ; Wed, 3 Feb 2021 23:38:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8D03B100AE4D; Thu, 4 Feb 2021 04:38:40 +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 57F31100763D for ; Thu, 4 Feb 2021 04:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413543; 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=rE1E0bwpuGn74pC6uWcxGF0HOZ4kMuJbttK998v5LFo=; b=a8Y+j7A3wNqnpLE4oy7PliPaCi8WQVX/W3rTyQI58GhcSDtkQCPuQZvvWus3V5ZjG346ou /uRN4E0cdFlA6qH7tc2uJU7Sd6yqHQv2ePN31LkkprOQsMeAx2PgGmSR8mRg+mjouo15X/ I/Ee/0Vtum1nxjSZpwPyh6woUk9wdLY= X-MC-Unique: UBTFLHVQNHqut2xa6RRX6Q-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 07/15] access: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:26 -0500 Message-Id: <20210204043834.191994-8-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/access/viraccessmanager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c index 02e4464ef5..c81d0840b3 100644 --- a/src/access/viraccessmanager.c +++ b/src/access/viraccessmanager.c @@ -190,7 +190,7 @@ static void virAccessManagerDispose(void *object) =20 if (mgr->drv->cleanup) mgr->drv->cleanup(mgr); - VIR_FREE(mgr->privateData); + g_free(mgr->privateData); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413616; cv=none; d=zohomail.com; s=zohoarc; b=c4JTG/rEPzI7Bdp9ik+1ZUcIln1Of70mmVosZBzAq8psiXUEcqb0GC7Q+2Klq12Ccc3hwKM+B1k3yIlLfGw4W7eq6cWBAPj8lUqhqdVUqish4jop+n4qNeEonzTjygK3wwC5JpK6raM4B2TNNTkw0p8k/yU6tUIlVJLKNM0kuIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413616; 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=EHAaA5CTc5jL5swXHxYL5DsEBlRLRCJz92ACqsQ1Ohc=; b=bfsv88lCo5HA4nhPnFlk42cLFixgZkxfwNvgrnqzYh2hOzg7OEKpMWNfSwzPeqpvrBk2L6qb0J/kPkbUd1W1pXfy0tiN9iUfZ6o1ziLpQgLWoGnUj3sH59ON6SAiNcE8Vp2yyYayC2bbCJF9Zfb5Zv0kvI/ZQ+LBzq3xX8ZEyqo= 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 1612413616250752.6437885083894; Wed, 3 Feb 2021 20:40: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-494-kB7JeB0uNMq_nPNfzSQvug-1; Wed, 03 Feb 2021 23:39:05 -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 0CCB68030BB; Thu, 4 Feb 2021 04:38:59 +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 DE6425D9C0; Thu, 4 Feb 2021 04:38:58 +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 9C24558077; Thu, 4 Feb 2021 04:38:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144ceMQ011332 for ; Wed, 3 Feb 2021 23:38:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id E58CF100AE4E; Thu, 4 Feb 2021 04:38:40 +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 AF72B100AE4D for ; Thu, 4 Feb 2021 04:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413615; 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=EHAaA5CTc5jL5swXHxYL5DsEBlRLRCJz92ACqsQ1Ohc=; b=OCUrU1IGAT20xO2vNF3Yo5941IfTUXMBtB01b1G7tJBwhFAVEV3jpsh0TsJqsNdD2FC4f5 6YGCrIqepLLYDL8/SFFotqTkXK+Iy4h+5VYb0gkMgP1uwcbj/bx5ZfTj6NeIH0pHuz5GsV JQ5WR3blZ5zV9CKyMnHXE4d82/TT7xM= X-MC-Unique: kB7JeB0uNMq_nPNfzSQvug-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 08/15] hypervisor: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:27 -0500 Message-Id: <20210204043834.191994-9-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/hypervisor/virhostdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index 09995a52ed..743aaa84d6 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -135,7 +135,7 @@ virHostdevManagerDispose(void *obj) virObjectUnref(hostdevMgr->activeSCSIVHostHostdevs); virObjectUnref(hostdevMgr->activeMediatedHostdevs); virObjectUnref(hostdevMgr->activeNVMeHostdevs); - VIR_FREE(hostdevMgr->stateDir); + g_free(hostdevMgr->stateDir); } =20 static virHostdevManagerPtr --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413615; cv=none; d=zohomail.com; s=zohoarc; b=cUzjeoRvZ/LAG38grVppTyl0uWCRrAaQE9+02xUaR5K8lUdcNWrvKATZjG1EXfKPlgolx2iVtNJJW86gAJW114Ouuws9UwkxJMn+7CSbgjvpOFssFPVQGnRskT2esswv7NitTfPW7L62PRNY4WpVcea5/4SD2L+0kYXZIfuD1Q8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413615; 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=u4rNun12lOewpUzq7G6JD+gCQClNFsEjbQjypHYhimA=; b=DMqrOCBsZjd9XcY7E+4vpg1sp8vREKiWO27SeAZFNXFhCZ/VzizExzVyGUTPGmoIZzboc235TIYcNs1GXmfAbZejcOSDH1Y1Vb/Mqy7SA81ZdlYm4woqCct654Jr90gkUUJwPhAti5IzS/ltmBMaFeD5MPbGWAkmIcrz8FBeY1I= 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 1612413615963375.7635109739539; Wed, 3 Feb 2021 20:40: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-530-DhUIYINlP9aDs-YlXzjzQQ-1; Wed, 03 Feb 2021 23:39:04 -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 83C041800D41; Thu, 4 Feb 2021 04:38:59 +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 32E525FC3A; Thu, 4 Feb 2021 04:38:59 +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 F3F7858078; Thu, 4 Feb 2021 04:38:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cfeu011337 for ; Wed, 3 Feb 2021 23:38:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 48A50100763D; Thu, 4 Feb 2021 04:38:41 +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 13A4B101E581 for ; Thu, 4 Feb 2021 04:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413614; 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=u4rNun12lOewpUzq7G6JD+gCQClNFsEjbQjypHYhimA=; b=Qy2pZPVklSZjJzEfSfOmmuPcqFSza4BU1ZvFCUOz9RXSvvcAyxYDrygDoDI4640AXUY2ZU bJOGZyIiE+yzCIurRrmkJ0/GfGz3BNWRkx1DUoQIJzQVw3CjEq4Mo9Nt6O34V4xQtpqfv7 QFtvyl5Tux6SZhB/LQrlIOvbDzie9RM= X-MC-Unique: DhUIYINlP9aDs-YlXzjzQQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 09/15] logging: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:28 -0500 Message-Id: <20210204043834.191994-10-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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 Reviewed-by: Daniel Henrique Barboza --- src/logging/log_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index 45a4763525..a77c1e0250 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -352,7 +352,7 @@ virLogHandlerDispose(void *obj) handler->inhibitor(false, handler->opaque); virLogHandlerLogFileFree(handler->files[i]); } - VIR_FREE(handler->files); + g_free(handler->files); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413609; cv=none; d=zohomail.com; s=zohoarc; b=OGcjd8mDs/EYFu6PoflmCkB5Sf//guMq+6c4QnW/tr2XrTGcpY3is86dV7SplZBSvPQn3FSJ+vz1ZEWmDIpRtJjyGPl1vn/iQaUntaB9s09vQGQvPlcNZnwE9vllVuN0FqKEGlwrY3mNihzyg7puCokFBPXv0sQXPGBTUGThrCA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413609; 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=e1F3mEgZemdxQgk2+z17AXWlV9gBJxM0RdivZ4zVJy8=; b=mzlfCrn80+BBFLIAhmHNRbbfMOZ5KXeaUlmc4IA4uyVIQCfWdq/YS1Mh8tmUTG7YtheFI2mWuPNgruyciC/xtv7qWUMvGcvHaa5Mx2F7gbI7hnxxYXOeBzgfM+St0ycFcWXG21xWg6EWq7yLdOimNxACk5gSUdeWmq8sgT/TQMk= 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 161241360996243.71072813313424; Wed, 3 Feb 2021 20:40:09 -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-9-uaXeucTWPcK2xwE0oEwdPg-1; Wed, 03 Feb 2021 23:39:08 -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 C2DEB8030BF; Thu, 4 Feb 2021 04:39:01 +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 9FE6960C71; Thu, 4 Feb 2021 04:39:01 +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 6C7E518089D2; Thu, 4 Feb 2021 04:39:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cfhK011342 for ; Wed, 3 Feb 2021 23:38:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id A0B2B100AE4D; Thu, 4 Feb 2021 04:38:41 +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 6B66F100763D for ; Thu, 4 Feb 2021 04:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413608; 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=e1F3mEgZemdxQgk2+z17AXWlV9gBJxM0RdivZ4zVJy8=; b=DeQ2CZc++kbhg/03znULzPs3aTPsk5iteo303S4ZPAa4AjL/GWFsuxnm8S95F0eJP+NZ5h HfYiaTna7UK95570kVbhcFpnfyQ25PRBnPQr9qGjS/NgeDb3tF0ekMDH30HiwwUrnCcI/j LWUPaHkjYtsyEpwkip6CB8/iOLR/ssE= X-MC-Unique: uaXeucTWPcK2xwE0oEwdPg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 10/15] rpc: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:29 -0500 Message-Id: <20210204043834.191994-11-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/rpc/virnetclient.c | 4 ++-- src/rpc/virnetdaemon.c | 6 +++--- src/rpc/virnetlibsshsession.c | 18 +++++++++--------- src/rpc/virnetsaslcontext.c | 2 +- src/rpc/virnetserver.c | 8 ++++---- src/rpc/virnetserverservice.c | 2 +- src/rpc/virnetsocket.c | 6 +++--- src/rpc/virnetsshsession.c | 8 ++++---- src/rpc/virnettlscontext.c | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 2eabacd6e8..edd65941ac 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -747,12 +747,12 @@ void virNetClientDispose(void *obj) =20 for (i =3D 0; i < client->nprograms; i++) virObjectUnref(client->programs[i]); - VIR_FREE(client->programs); + g_free(client->programs); =20 g_main_loop_unref(client->eventLoop); g_main_context_unref(client->eventCtx); =20 - VIR_FREE(client->hostname); + g_free(client->hostname); =20 if (client->sock) virNetSocketRemoveIOCallback(client->sock); diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index e337ff1fde..2c18da790b 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -99,9 +99,9 @@ virNetDaemonDispose(void *obj) =20 for (i =3D 0; i < dmn->nsignals; i++) { sigaction(dmn->signals[i]->signum, &dmn->signals[i]->oldaction, NU= LL); - VIR_FREE(dmn->signals[i]); + g_free(dmn->signals[i]); } - VIR_FREE(dmn->signals); + g_free(dmn->signals); VIR_FORCE_CLOSE(dmn->sigread); VIR_FORCE_CLOSE(dmn->sigwrite); if (dmn->sigwatch > 0) @@ -109,7 +109,7 @@ virNetDaemonDispose(void *obj) #endif /* !WIN32 */ =20 VIR_FORCE_CLOSE(dmn->autoShutdownInhibitFd); - VIR_FREE(dmn->stateStopThread); + g_free(dmn->stateStopThread); =20 virHashFree(dmn->servers); =20 diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 48ef914c70..8814487557 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -132,18 +132,18 @@ virNetLibsshSessionDispose(void *obj) =20 for (i =3D 0; i < sess->nauths; i++) { virSecureEraseString(sess->auths[i]->password); - VIR_FREE(sess->auths[i]->password); - VIR_FREE(sess->auths[i]->filename); - VIR_FREE(sess->auths[i]); + g_free(sess->auths[i]->password); + g_free(sess->auths[i]->filename); + g_free(sess->auths[i]); } =20 - VIR_FREE(sess->auths); + g_free(sess->auths); =20 - VIR_FREE(sess->channelCommand); - VIR_FREE(sess->hostname); - VIR_FREE(sess->knownHostsFile); - VIR_FREE(sess->authPath); - VIR_FREE(sess->username); + g_free(sess->channelCommand); + g_free(sess->hostname); + g_free(sess->knownHostsFile); + g_free(sess->authPath); + g_free(sess->username); } =20 static virClassPtr virNetLibsshSessionClass; diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index 9253771787..8a6250120d 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -699,7 +699,7 @@ void virNetSASLSessionDispose(void *obj) =20 if (sasl->conn) sasl_dispose(&sasl->conn); - VIR_FREE(sasl->callbacks); + g_free(sasl->callbacks); } =20 #ifdef __APPLE__ diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index fa63acbb09..f0b866a962 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -909,21 +909,21 @@ void virNetServerDispose(void *obj) virNetServerPtr srv =3D obj; size_t i; =20 - VIR_FREE(srv->name); + g_free(srv->name); =20 virThreadPoolFree(srv->workers); =20 for (i =3D 0; i < srv->nservices; i++) virObjectUnref(srv->services[i]); - VIR_FREE(srv->services); + g_free(srv->services); =20 for (i =3D 0; i < srv->nprograms; i++) virObjectUnref(srv->programs[i]); - VIR_FREE(srv->programs); + g_free(srv->programs); =20 for (i =3D 0; i < srv->nclients; i++) virObjectUnref(srv->clients[i]); - VIR_FREE(srv->clients); + g_free(srv->clients); } =20 void virNetServerClose(virNetServerPtr srv) diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c index 317cacf25b..73232e3747 100644 --- a/src/rpc/virnetserverservice.c +++ b/src/rpc/virnetserverservice.c @@ -419,7 +419,7 @@ void virNetServerServiceDispose(void *obj) =20 for (i =3D 0; i < svc->nsocks; i++) virObjectUnref(svc->socks[i]); - VIR_FREE(svc->socks); + g_free(svc->socks); =20 virObjectUnref(svc->tls); } diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index e56d43ba85..d0dc59c10c 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -1356,9 +1356,9 @@ void virNetSocketDispose(void *obj) =20 virProcessAbort(sock->pid); =20 - VIR_FREE(sock->localAddrStrSASL); - VIR_FREE(sock->remoteAddrStrSASL); - VIR_FREE(sock->remoteAddrStrURI); + g_free(sock->localAddrStrSASL); + g_free(sock->remoteAddrStrSASL); + g_free(sock->remoteAddrStrURI); } =20 =20 diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index 5bfe311544..f42aed3f62 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -151,10 +151,10 @@ virNetSSHSessionDispose(void *obj) =20 virNetSSHSessionAuthMethodsClear(sess); =20 - VIR_FREE(sess->channelCommand); - VIR_FREE(sess->hostname); - VIR_FREE(sess->knownHostsFile); - VIR_FREE(sess->authPath); + g_free(sess->channelCommand); + g_free(sess->hostname); + g_free(sess->knownHostsFile); + g_free(sess->authPath); } =20 static virClassPtr virNetSSHSessionClass; diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index 84f7e63e4d..2936b8ba57 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -1146,7 +1146,7 @@ void virNetTLSContextDispose(void *obj) PROBE(RPC_TLS_CONTEXT_DISPOSE, "ctxt=3D%p", ctxt); =20 - VIR_FREE(ctxt->priority); + g_free(ctxt->priority); gnutls_dh_params_deinit(ctxt->dhParams); gnutls_certificate_free_credentials(ctxt->x509cred); } @@ -1415,8 +1415,8 @@ void virNetTLSSessionDispose(void *obj) PROBE(RPC_TLS_SESSION_DISPOSE, "sess=3D%p", sess); =20 - VIR_FREE(sess->x509dname); - VIR_FREE(sess->hostname); + g_free(sess->x509dname); + g_free(sess->hostname); gnutls_deinit(sess->session); } =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413613; cv=none; d=zohomail.com; s=zohoarc; b=ecbp8FTOrlMYdSrLLLj0XWg7UPYWqiEWZydsnVdsaXKatt3qlxv9OBMqrBKoYiueAlmys/7RCvDvcsZnOL68gYvY+QLZmT/Fn0QEArx0HSHLRqQgnkY6GzLDyPcbu0oXgHrNio6CNSDmVs8mCUvnPerjgh/OjPqu+yJ3FCDnpJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413613; 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=aENN69D9dP4xIg1cIZvDRiQv6KjH2iRQkeVTHue/2AA=; b=Ox3WjTgtExVaumZfwmbMmIYGc7psFGp7mTcygYiZ5VqpiHSvVmUoqCdrRC5ZV3e8+biWmSYVvV0Q7oDt88dEOxl6r9w691lCtIdYb6VqIP4USHIZ6u+7cAM3FHgaR3CCh9M3XPUftuIxTEPZTSafim3xxpa1vxgPAGfIVIXX4YM= 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 1612413613151644.8533263611131; Wed, 3 Feb 2021 20:40:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-546-vTBRSRraOtu4la1ekGU8qg-1; Wed, 03 Feb 2021 23:39:07 -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 1128D1020C2D; Thu, 4 Feb 2021 04:39:02 +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 E59CA71C8B; Thu, 4 Feb 2021 04:39:01 +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 AFFDC18089D4; Thu, 4 Feb 2021 04:39:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cg2n011349 for ; Wed, 3 Feb 2021 23:38:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 04571100AE4D; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-199.phx2.redhat.com [10.3.112.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3201100763D for ; Thu, 4 Feb 2021 04:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413612; 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=aENN69D9dP4xIg1cIZvDRiQv6KjH2iRQkeVTHue/2AA=; b=VdrKn6jbEeqY43RLJGwwsfEL89bjgpVrpVJq6hpqLxu2Ujur3tU8ztwSnZxHYj2Be/aXW5 OdhrHQ+HduiY+prfJAizoSpDMU0NxYqaSL7YgGmyiJLhXJJougOo/4CrhgI2t8pSZHIfBS 5bUka+KlpbRv4JjdtOEiCGw8popy1AY= X-MC-Unique: vTBRSRraOtu4la1ekGU8qg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 11/15] security: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:30 -0500 Message-Id: <20210204043834.191994-12-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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 Reviewed-by: Daniel Henrique Barboza --- src/security/security_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/security_manager.c b/src/security/security_manage= r.c index be81ee5e44..67ede11981 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -55,7 +55,7 @@ void virSecurityManagerDispose(void *obj) =20 if (mgr->drv->close) mgr->drv->close(mgr); - VIR_FREE(mgr->privateData); + g_free(mgr->privateData); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413604; cv=none; d=zohomail.com; s=zohoarc; b=F9L8tUMHbn9V2ov4JBbqOQFxQ9RmQZklFLrL3KoWzEjOTKMu+Tkk78NH9IEeA851lDV1sXvR8AHZ4LTL0J55tylqhUhbljr8KUHzx6xd23oqyOqcvUDevvq33o/8U+8fOzT7eZ15PnjkZbFi5iQ+rVzdUoPGQYPs0l/WXNt6FMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413604; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uB95Luct54h6RneGl3xQ4GgXLQcGjn5rm1EPACbOGtI=; b=ip4hN4JI/0JRGGFHJ4vuOqtkD33ZeLyC/xeC4ypBlNxdPoP0rni0ArA/JjZXS4OgSNJ/NL+F8KKCkZg3IZpTlfMfYf9vwMvl0putiXEXFzTC+txsXQc1tXXKCzSRAAgGC7rCs/u9Vw51Z/ir+npZ1zvFXieJuzVcfT3HIqHWwQQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612413604259797.2789638002992; Wed, 3 Feb 2021 20:40:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-pf3R6PAoPaGaMWPdDkrS2A-1; Wed, 03 Feb 2021 23:39:10 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 95B1E801960; Thu, 4 Feb 2021 04:39:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 702826F986; Thu, 4 Feb 2021 04:39:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3AD735807B; Thu, 4 Feb 2021 04:39:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cg3Q011357 for ; Wed, 3 Feb 2021 23:38:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C4F6100AE4E; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-199.phx2.redhat.com [10.3.112.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27205100AE4D for ; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413603; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uB95Luct54h6RneGl3xQ4GgXLQcGjn5rm1EPACbOGtI=; b=DBZwMbFS0/RcFn7ZQa+785raFcbxboMHbjgd+9pud7a4PQ46o0g74dj4Jmym5ch0FcF35U NjNF0rykvj1MnZsd4S8Hgxh+OOG+isHmAVbP8g44Y4YtOXBto31aSZ/rR2UzK4CMYcdFG7 BUMcPo8Jad5uwXdAt/Lss5PVMj5osEY= X-MC-Unique: pf3R6PAoPaGaMWPdDkrS2A-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 12/15] util: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:31 -0500 Message-Id: <20210204043834.191994-13-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/util/virdnsmasq.c | 2 +- src/util/virfilecache.c | 4 ++-- src/util/virmdev.c | 2 +- src/util/virnvme.c | 2 +- src/util/virpci.c | 2 +- src/util/virresctrl.c | 40 ++++++++++++++++++++-------------------- src/util/virscsi.c | 2 +- src/util/virscsivhost.c | 2 +- src/util/virusb.c | 2 +- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 653d46bef9..3eee4a5a84 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -604,7 +604,7 @@ dnsmasqCapsDispose(void *obj) dnsmasqCapsPtr caps =3D obj; =20 virBitmapFree(caps->flags); - VIR_FREE(caps->binaryPath); + g_free(caps->binaryPath); } =20 static int dnsmasqCapsOnceInit(void) diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index a761a01b25..14b2885505 100644 --- a/src/util/virfilecache.c +++ b/src/util/virfilecache.c @@ -74,8 +74,8 @@ virFileCacheDispose(void *obj) { virFileCachePtr cache =3D obj; =20 - VIR_FREE(cache->dir); - VIR_FREE(cache->suffix); + g_free(cache->dir); + g_free(cache->suffix); =20 virHashFree(cache->table); =20 diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 1f5c2cba30..db40fe8cc3 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -297,7 +297,7 @@ virMediatedDeviceListDispose(void *obj) } =20 list->count =3D 0; - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virnvme.c b/src/util/virnvme.c index af297552c1..a1fc9aab57 100644 --- a/src/util/virnvme.c +++ b/src/util/virnvme.c @@ -166,7 +166,7 @@ virNVMeDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virNVMeDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virpci.c b/src/util/virpci.c index b8e8422aa0..8147ce11e9 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1667,7 +1667,7 @@ virPCIDeviceListDispose(void *obj) } =20 list->count =3D 0; - VIR_FREE(list->devs); + g_free(list->devs); } =20 int diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4ee95aa232..29df51c652 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -210,18 +210,18 @@ virResctrlInfoDispose(void *obj) =20 if (level->types) { for (j =3D 0; j < VIR_CACHE_TYPE_LAST; j++) - VIR_FREE(level->types[j]); + g_free(level->types[j]); } - VIR_FREE(level->types); - VIR_FREE(level); + g_free(level->types); + g_free(level); } =20 if (resctrl->monitor_info) g_strfreev(resctrl->monitor_info->features); =20 - VIR_FREE(resctrl->membw_info); - VIR_FREE(resctrl->levels); - VIR_FREE(resctrl->monitor_info); + g_free(resctrl->membw_info); + g_free(resctrl->levels); + g_free(resctrl->monitor_info); } =20 =20 @@ -396,30 +396,30 @@ virResctrlAllocDispose(void *obj) continue; =20 for (k =3D 0; k < type->nsizes; k++) - VIR_FREE(type->sizes[k]); + g_free(type->sizes[k]); =20 for (k =3D 0; k < type->nmasks; k++) virBitmapFree(type->masks[k]); =20 - VIR_FREE(type->sizes); - VIR_FREE(type->masks); - VIR_FREE(type); + g_free(type->sizes); + g_free(type->masks); + g_free(type); } - VIR_FREE(level->types); - VIR_FREE(level); + g_free(level->types); + g_free(level); } =20 if (alloc->mem_bw) { virResctrlAllocMemBWPtr mem_bw =3D alloc->mem_bw; for (i =3D 0; i < mem_bw->nbandwidths; i++) - VIR_FREE(mem_bw->bandwidths[i]); - VIR_FREE(alloc->mem_bw->bandwidths); - VIR_FREE(alloc->mem_bw); + g_free(mem_bw->bandwidths[i]); + g_free(alloc->mem_bw->bandwidths); + g_free(alloc->mem_bw); } =20 - VIR_FREE(alloc->id); - VIR_FREE(alloc->path); - VIR_FREE(alloc->levels); + g_free(alloc->id); + g_free(alloc->path); + g_free(alloc->levels); } =20 =20 @@ -429,8 +429,8 @@ virResctrlMonitorDispose(void *obj) virResctrlMonitorPtr monitor =3D obj; =20 virObjectUnref(monitor->alloc); - VIR_FREE(monitor->id); - VIR_FREE(monitor->path); + g_free(monitor->id); + g_free(monitor->path); } =20 =20 diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 0c753c075e..2a9f6da76a 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -347,7 +347,7 @@ virSCSIDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virSCSIDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 int diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index 5907edbc7e..b7bf0da1b3 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -60,7 +60,7 @@ virSCSIVHostDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virSCSIVHostDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 =20 diff --git a/src/util/virusb.c b/src/util/virusb.c index ae400de656..6d897600e5 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -434,7 +434,7 @@ virUSBDeviceListDispose(void *obj) for (i =3D 0; i < list->count; i++) virUSBDeviceFree(list->devs[i]); =20 - VIR_FREE(list->devs); + g_free(list->devs); } =20 int --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413552; cv=none; d=zohomail.com; s=zohoarc; b=RZIZ040Wb3mUz4ioSUJ2JyDmY0LfeaJcR+DS2rzpC8/XSlBE8B1D8X7Ty9UlWLfVEie0HQwmcfHWTuh3nmvr0OV7lvlSL58jQjL9mIKe5JafZUAC5N8yMJ60UhedNs29Y+7G6mxa5OUR4iy83/XAEpcspuc4tDzK3cQb3/CJnvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413552; 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=n2KjnSCmycROVwQJcYMGa5zx/nUBVcudyVl6sAZigNY=; b=HWj8E3DCqv3vwNbGqzRv4jrzC841JwyMZ5fWD9IV0DOFECy+LaJ4EJvJKwFL87loJo8PfYQ+zn7Syc35QImwZTgqL8zui/wOIKhAbefi7/yANabCsTzfHywz1InEZ5o1n5N7BgtcN3L6uTRzXw1B5r46tYsdqni0SJoe1NyKTL0= 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 161241355259269.56468662197778; Wed, 3 Feb 2021 20:39: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-558-k8EYlVW5O6aBrc27Uc9KBQ-1; Wed, 03 Feb 2021 23:39:09 -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 3CB12107ACFC; Thu, 4 Feb 2021 04:39:04 +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 1900663747; Thu, 4 Feb 2021 04:39:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D8977180881C; Thu, 4 Feb 2021 04:39:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144cgbX011365 for ; Wed, 3 Feb 2021 23:38:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id B6AF1100AE4D; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-199.phx2.redhat.com [10.3.112.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803F9101E581 for ; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413551; 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=n2KjnSCmycROVwQJcYMGa5zx/nUBVcudyVl6sAZigNY=; b=NsyFdpa6ulT1PONBzYsY9RENjO3OrSnx0riWCNoBAfxa5y7cEfT3iX9xCGroyU38o6lmZT jSVr+i1IS0pEEbW7NqGakxn2zTaOI3ukW8RDx1tX2wCGtt9HQxmLAOVYW/GhWYehrJPLUV zpEJmOwMo7my1YEiosgqFo2b6xA0PCQ= X-MC-Unique: k8EYlVW5O6aBrc27Uc9KBQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 13/15] conf: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:32 -0500 Message-Id: <20210204043834.191994-14-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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 Reviewed-by: Daniel Henrique Barboza --- src/conf/capabilities.c | 22 +++++++------- src/conf/checkpoint_conf.c | 2 +- src/conf/domain_capabilities.c | 12 ++++---- src/conf/domain_conf.c | 2 +- src/conf/domain_event.c | 52 +++++++++++++++++----------------- src/conf/moment_conf.c | 6 ++-- src/conf/object_event.c | 4 +-- src/conf/snapshot_conf.c | 4 +-- src/conf/virsecretobj.c | 6 ++-- src/conf/virstorageobj.c | 4 +-- 10 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 02fbf60b02..dd3321db9a 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -232,39 +232,39 @@ virCapsDispose(void *object) =20 for (i =3D 0; i < caps->npools; i++) virCapabilitiesFreeStoragePool(caps->pools[i]); - VIR_FREE(caps->pools); + g_free(caps->pools); =20 for (i =3D 0; i < caps->nguests; i++) virCapabilitiesFreeGuest(caps->guests[i]); - VIR_FREE(caps->guests); + g_free(caps->guests); =20 for (i =3D 0; i < caps->host.nfeatures; i++) - VIR_FREE(caps->host.features[i]); - VIR_FREE(caps->host.features); + g_free(caps->host.features[i]); + g_free(caps->host.features); =20 if (caps->host.numa) virCapabilitiesHostNUMAUnref(caps->host.numa); =20 for (i =3D 0; i < caps->host.nmigrateTrans; i++) - VIR_FREE(caps->host.migrateTrans[i]); - VIR_FREE(caps->host.migrateTrans); + g_free(caps->host.migrateTrans[i]); + g_free(caps->host.migrateTrans); =20 for (i =3D 0; i < caps->host.nsecModels; i++) virCapabilitiesClearSecModel(&caps->host.secModels[i]); - VIR_FREE(caps->host.secModels); + g_free(caps->host.secModels); =20 for (i =3D 0; i < caps->host.cache.nbanks; i++) virCapsHostCacheBankFree(caps->host.cache.banks[i]); virResctrlInfoMonFree(caps->host.cache.monitor); - VIR_FREE(caps->host.cache.banks); + g_free(caps->host.cache.banks); =20 for (i =3D 0; i < caps->host.memBW.nnodes; i++) virCapsHostMemBWNodeFree(caps->host.memBW.nodes[i]); virResctrlInfoMonFree(caps->host.memBW.monitor); - VIR_FREE(caps->host.memBW.nodes); + g_free(caps->host.memBW.nodes); =20 - VIR_FREE(caps->host.netprefix); - VIR_FREE(caps->host.pagesSize); + g_free(caps->host.netprefix); + g_free(caps->host.pagesSize); virCPUDefFree(caps->host.cpu); virObjectUnref(caps->host.resctrl); } diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 16fb138a3e..f8704852e0 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -87,7 +87,7 @@ virDomainCheckpointDefDispose(void *obj) =20 for (i =3D 0; i < def->ndisks; i++) virDomainCheckpointDiskDefClear(&def->disks[i]); - VIR_FREE(def->disks); + g_free(def->disks); } =20 static int diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 407cf0348a..8605216cf7 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -84,16 +84,16 @@ virDomainCapsDispose(void *obj) virDomainCapsStringValuesPtr values; size_t i; =20 - VIR_FREE(caps->path); - VIR_FREE(caps->machine); + g_free(caps->path); + g_free(caps->machine); virObjectUnref(caps->cpu.custom); virCPUDefFree(caps->cpu.hostModel); virSEVCapabilitiesFree(caps->sev); =20 values =3D &caps->os.loader.values; for (i =3D 0; i < values->nvalues; i++) - VIR_FREE(values->values[i]); - VIR_FREE(values->values); + g_free(values->values[i]); + g_free(values->values); } =20 =20 @@ -104,11 +104,11 @@ virDomainCapsCPUModelsDispose(void *obj) size_t i; =20 for (i =3D 0; i < cpuModels->nmodels; i++) { - VIR_FREE(cpuModels->models[i].name); + g_free(cpuModels->models[i].name); g_strfreev(cpuModels->models[i].blockers); } =20 - VIR_FREE(cpuModels->models); + g_free(cpuModels->models); } =20 =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3f71297283..07e6f39256 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2699,7 +2699,7 @@ virDomainChrSourceDefDispose(void *obj) if (def->seclabels) { for (i =3D 0; i < def->nseclabels; i++) virSecurityDeviceLabelDefFree(def->seclabels[i]); - VIR_FREE(def->seclabels); + g_free(def->seclabels); } } =20 diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 0fde3481ed..726a792dae 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -387,9 +387,9 @@ virDomainEventIOErrorDispose(void *obj) virDomainEventIOErrorPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->srcPath); - VIR_FREE(event->devAlias); - VIR_FREE(event->reason); + g_free(event->srcPath); + g_free(event->devAlias); + g_free(event->reason); } =20 static void @@ -399,23 +399,23 @@ virDomainEventGraphicsDispose(void *obj) VIR_DEBUG("obj=3D%p", event); =20 if (event->local) { - VIR_FREE(event->local->node); - VIR_FREE(event->local->service); - VIR_FREE(event->local); + g_free(event->local->node); + g_free(event->local->service); + g_free(event->local); } if (event->remote) { - VIR_FREE(event->remote->node); - VIR_FREE(event->remote->service); - VIR_FREE(event->remote); + g_free(event->remote->node); + g_free(event->remote->service); + g_free(event->remote); } - VIR_FREE(event->authScheme); + g_free(event->authScheme); if (event->subject) { size_t i; for (i =3D 0; i < event->subject->nidentity; i++) { - VIR_FREE(event->subject->identities[i].type); - VIR_FREE(event->subject->identities[i].name); + g_free(event->subject->identities[i].type); + g_free(event->subject->identities[i].name); } - VIR_FREE(event->subject); + g_free(event->subject); } } =20 @@ -425,7 +425,7 @@ virDomainEventBlockJobDispose(void *obj) virDomainEventBlockJobPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->disk); + g_free(event->disk); } =20 static void @@ -434,9 +434,9 @@ virDomainEventDiskChangeDispose(void *obj) virDomainEventDiskChangePtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->oldSrcPath); - VIR_FREE(event->newSrcPath); - VIR_FREE(event->devAlias); + g_free(event->oldSrcPath); + g_free(event->newSrcPath); + g_free(event->devAlias); } =20 static void @@ -445,7 +445,7 @@ virDomainEventTrayChangeDispose(void *obj) virDomainEventTrayChangePtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->devAlias); + g_free(event->devAlias); } =20 static void @@ -461,7 +461,7 @@ virDomainEventDeviceRemovedDispose(void *obj) virDomainEventDeviceRemovedPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->devAlias); + g_free(event->devAlias); } =20 static void @@ -470,7 +470,7 @@ virDomainEventDeviceAddedDispose(void *obj) virDomainEventDeviceAddedPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->devAlias); + g_free(event->devAlias); } =20 =20 @@ -480,7 +480,7 @@ virDomainEventDeviceRemovalFailedDispose(void *obj) virDomainEventDeviceRemovalFailedPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->devAlias); + g_free(event->devAlias); } =20 =20 @@ -497,8 +497,8 @@ virDomainQemuMonitorEventDispose(void *obj) virDomainQemuMonitorEventPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->event); - VIR_FREE(event->details); + g_free(event->event); + g_free(event->details); } =20 static void @@ -540,7 +540,7 @@ virDomainEventMetadataChangeDispose(void *obj) virDomainEventMetadataChangePtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->nsuri); + g_free(event->nsuri); } =20 =20 @@ -550,8 +550,8 @@ virDomainEventBlockThresholdDispose(void *obj) virDomainEventBlockThresholdPtr event =3D obj; VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->dev); - VIR_FREE(event->path); + g_free(event->dev); + g_free(event->path); } =20 =20 diff --git a/src/conf/moment_conf.c b/src/conf/moment_conf.c index fb6f7824cb..c643cbf6d6 100644 --- a/src/conf/moment_conf.c +++ b/src/conf/moment_conf.c @@ -62,9 +62,9 @@ virDomainMomentDefDispose(void *obj) { virDomainMomentDefPtr def =3D obj; =20 - VIR_FREE(def->name); - VIR_FREE(def->description); - VIR_FREE(def->parent_name); + g_free(def->name); + g_free(def->description); + g_free(def->parent_name); virDomainDefFree(def->dom); virDomainDefFree(def->inactiveDom); } diff --git a/src/conf/object_event.c b/src/conf/object_event.c index 907aa6d06a..5d7d45355e 100644 --- a/src/conf/object_event.c +++ b/src/conf/object_event.c @@ -123,8 +123,8 @@ virObjectEventDispose(void *obj) =20 VIR_DEBUG("obj=3D%p", event); =20 - VIR_FREE(event->meta.name); - VIR_FREE(event->meta.key); + g_free(event->meta.name); + g_free(event->meta.key); } =20 /** diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index df88a0bc72..36ce1a08ca 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -125,10 +125,10 @@ virDomainSnapshotDefDispose(void *obj) virDomainSnapshotDefPtr def =3D obj; size_t i; =20 - VIR_FREE(def->file); + g_free(def->file); for (i =3D 0; i < def->ndisks; i++) virDomainSnapshotDiskDefClear(&def->disks[i]); - VIR_FREE(def->disks); + g_free(def->disks); virObjectUnref(def->cookie); } =20 diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index a1b750fb05..fd27bb1f01 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -137,10 +137,10 @@ virSecretObjDispose(void *opaque) if (obj->value) { /* Wipe before free to ensure we don't leave a secret on the heap = */ memset(obj->value, 0, obj->value_size); - VIR_FREE(obj->value); + g_free(obj->value); } - VIR_FREE(obj->configFile); - VIR_FREE(obj->base64File); + g_free(obj->configFile); + g_free(obj->base64File); } =20 =20 diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 9fe8b3f28e..6a8874b1fb 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -378,8 +378,8 @@ virStoragePoolObjDispose(void *opaque) virStoragePoolDefFree(obj->def); virStoragePoolDefFree(obj->newDef); =20 - VIR_FREE(obj->configFile); - VIR_FREE(obj->autostartLink); + g_free(obj->configFile); + g_free(obj->autostartLink); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413555; cv=none; d=zohomail.com; s=zohoarc; b=YDOgH2XTiiSChM3cVqiy1IyQGtcprFCV4AypAuZ8+cwPdwDcmG4myMYqaYYWdeyFLJryGnaIpcQRMsqweVfKdEo1PxG3NCHFbADGABVj/Hxq5liwSFT2sXqrogPyJXyMCg17nSxlwHo6LAWI6cCTit8cu7+U8aGkSUVk6+Jep7M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413555; 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=Py7koMxRUhgDKybJlXOSOe8xUTjK5QyfZkYrNnnYdUs=; b=MHg8qdhI7/RrB1xtDl/B7Nx6IfvlYtOYdXhE4npcvRL/AzkMLPQ2ClXZ8BNROKeJSHzvR5ZTZ9jnGjoL6qqQvykjERLD+LENOtA23FkuTsu+gEAO2ciNNvXd7gIequs47PhnJnbQQ3LZbtChR3hRy9Q4fkFK6QdSaNmXnFgsf9A= 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 1612413555638277.20604971207626; Wed, 3 Feb 2021 20:39: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-13-GS2KbntbMHyCO9tpKV0Zsg-1; Wed, 03 Feb 2021 23:39:12 -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 03091AFA83; Thu, 4 Feb 2021 04:39:07 +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 D7A8260C71; Thu, 4 Feb 2021 04:39:06 +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 A446A18077CD; Thu, 4 Feb 2021 04:39:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144chrD011379 for ; Wed, 3 Feb 2021 23:38:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1D9E6100AE4D; Thu, 4 Feb 2021 04:38:43 +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 D85BA100763D for ; Thu, 4 Feb 2021 04:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413554; 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=Py7koMxRUhgDKybJlXOSOe8xUTjK5QyfZkYrNnnYdUs=; b=LpIl6gdFRb3imwT+pru0G/BpYdQilAsv9ILmJNWZlR6VcjWdxQmOuu1t6F42IH2lo8FjTB iTjk163Df78OobTNAzRn9Xay1kUBIeecNFZ1YjCRFR/VeCTi7RGxIzIs7bHiX5+sFOvQXm yYKny+AIjxPT6jfgqDIQfNwauq0K1AM= X-MC-Unique: GS2KbntbMHyCO9tpKV0Zsg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 14/15] tests: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:33 -0500 Message-Id: <20210204043834.191994-15-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- tests/virfilecachetest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virfilecachetest.c b/tests/virfilecachetest.c index 34e0d0ab2f..4d65c0c6ce 100644 --- a/tests/virfilecachetest.c +++ b/tests/virfilecachetest.c @@ -43,7 +43,7 @@ static void testFileCacheObjDispose(void *opaque) { testFileCacheObjPtr obj =3D opaque; - VIR_FREE(obj->data); + g_free(obj->data); } =20 =20 --=20 2.29.2 From nobody Sun Apr 28 21:43:06 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=1612413607; cv=none; d=zohomail.com; s=zohoarc; b=dDiWRHW+kkajzK0lovD2DvTHm7MHZD5rQUL3zWNkr9XQ5sMb9OvsopB4lmRZG1QDRPWaJTDvpBlgvUK3UVDUpEWjfNHW34FkqBMLwK3XFLJ3ffnfzBdIr/zxDEtfOd4G3yca2wG/k0q2mlPWXVoPCNWgD9ken/geRnKxkx9/TpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612413607; 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=bOPjOJmxYX7P45Ax0A4iXRRvDV8K3Z2eKJfyszQtRFI=; b=joEGQYuWgA1YMUuQ7/xmqI+u9mC8vWzCWNJJhiGGZx6Lb91RCPAoPlvuRGQfAYJSaBPzFe7suVj8vtKRt6IHqYE3lUbVVW2KcygR2loc3U2Q1alVFMSr1Odq8Yfz9mYQMh619uyNk14Ow6GYebeVe5NPb0ZkfrHn2o7nTcwThMs= 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 1612413607275271.5369363620449; Wed, 3 Feb 2021 20:40:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-Jl5og5uuMCOcZi3M42C64Q-1; Wed, 03 Feb 2021 23:39:13 -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 CC194801968; Thu, 4 Feb 2021 04:39:07 +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 A4AC91A266; Thu, 4 Feb 2021 04:39:07 +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 713E55807F; Thu, 4 Feb 2021 04:39:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1144ckNo011409 for ; Wed, 3 Feb 2021 23:38:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 52745100AE4E; Thu, 4 Feb 2021 04:38:46 +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 1D27C100AE4D for ; Thu, 4 Feb 2021 04:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612413606; 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=bOPjOJmxYX7P45Ax0A4iXRRvDV8K3Z2eKJfyszQtRFI=; b=KYjarVOWX8qU6C22WAnBWLSBarxKZLn5200NNNdoDcu1QdGyes9P/Siy/w3T63zNvsskim Hp4SLspKvPlrlii9Wxb/zF0JauGgn6y53W9s3V54l9mRvdvaEt57sqsEK6vsvChufh5zLH dUQKFUyea5G/7lv1XDb5vuTTI8UW3FQ= X-MC-Unique: Jl5og5uuMCOcZi3M42C64Q-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 15/15] datatypes: replace VIR_FREE with g_free in all *Dispose() functions Date: Wed, 3 Feb 2021 23:38:34 -0500 Message-Id: <20210204043834.191994-16-laine@redhat.com> In-Reply-To: <20210204043834.191994-1-laine@redhat.com> References: <20210204043834.191994-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/datatypes.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/datatypes.c b/src/datatypes.c index 1db38c5aa6..e36f3a2d24 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -347,7 +347,7 @@ virDomainDispose(void *obj) virUUIDFormat(domain->uuid, uuidstr); VIR_DEBUG("release domain %p %s %s", domain, domain->name, uuidstr); =20 - VIR_FREE(domain->name); + g_free(domain->name); virObjectUnref(domain->conn); } =20 @@ -409,7 +409,7 @@ virNetworkDispose(void *obj) virUUIDFormat(network->uuid, uuidstr); VIR_DEBUG("release network %p %s %s", network, network->name, uuidstr); =20 - VIR_FREE(network->name); + g_free(network->name); virObjectUnref(network->conn); } =20 @@ -528,8 +528,8 @@ virInterfaceDispose(void *obj) virInterfacePtr iface =3D obj; VIR_DEBUG("release interface %p %s", iface, iface->name); =20 - VIR_FREE(iface->name); - VIR_FREE(iface->mac); + g_free(iface->name); + g_free(iface->mac); virObjectUnref(iface->conn); } =20 @@ -603,7 +603,7 @@ virStoragePoolDispose(void *obj) if (pool->privateDataFreeFunc) pool->privateDataFreeFunc(pool->privateData); =20 - VIR_FREE(pool->name); + g_free(pool->name); virObjectUnref(pool->conn); } =20 @@ -676,9 +676,9 @@ virStorageVolDispose(void *obj) if (vol->privateDataFreeFunc) vol->privateDataFreeFunc(vol->privateData); =20 - VIR_FREE(vol->key); - VIR_FREE(vol->name); - VIR_FREE(vol->pool); + g_free(vol->key); + g_free(vol->name); + g_free(vol->pool); virObjectUnref(vol->conn); } =20 @@ -734,8 +734,8 @@ virNodeDeviceDispose(void *obj) virNodeDevicePtr dev =3D obj; VIR_DEBUG("release dev %p %s", dev, dev->name); =20 - VIR_FREE(dev->name); - VIR_FREE(dev->parentName); + g_free(dev->name); + g_free(dev->parentName); =20 virObjectUnref(dev->conn); } @@ -798,7 +798,7 @@ virSecretDispose(void *obj) virUUIDFormat(secret->uuid, uuidstr); VIR_DEBUG("release secret %p %s", secret, uuidstr); =20 - VIR_FREE(secret->usageID); + g_free(secret->usageID); virObjectUnref(secret->conn); } =20 @@ -910,7 +910,7 @@ virNWFilterDispose(void *obj) virUUIDFormat(nwfilter->uuid, uuidstr); VIR_DEBUG("release nwfilter %p %s %s", nwfilter, nwfilter->name, uuids= tr); =20 - VIR_FREE(nwfilter->name); + g_free(nwfilter->name); virObjectUnref(nwfilter->conn); } =20 @@ -972,8 +972,8 @@ virNWFilterBindingDispose(void *obj) =20 VIR_DEBUG("release binding %p %s", binding, binding->portdev); =20 - VIR_FREE(binding->portdev); - VIR_FREE(binding->filtername); + g_free(binding->portdev); + g_free(binding->filtername); virObjectUnref(binding->conn); } =20 @@ -1030,7 +1030,7 @@ virDomainCheckpointDispose(void *obj) virDomainCheckpointPtr checkpoint =3D obj; VIR_DEBUG("release checkpoint %p %s", checkpoint, checkpoint->name); =20 - VIR_FREE(checkpoint->name); + g_free(checkpoint->name); virObjectUnref(checkpoint->domain); } =20 @@ -1086,7 +1086,7 @@ virDomainSnapshotDispose(void *obj) virDomainSnapshotPtr snapshot =3D obj; VIR_DEBUG("release snapshot %p %s", snapshot, snapshot->name); =20 - VIR_FREE(snapshot->name); + g_free(snapshot->name); virObjectUnref(snapshot->domain); } =20 @@ -1222,7 +1222,7 @@ virAdmServerDispose(void *obj) virAdmServerPtr srv =3D obj; VIR_DEBUG("release server srv=3D%p name=3D%s", srv, srv->name); =20 - VIR_FREE(srv->name); + g_free(srv->name); virObjectUnref(srv->conn); } =20 --=20 2.29.2