From nobody Mon Feb 9 01:47:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565021695; cv=none; d=zoho.com; s=zohoarc; b=Rowd0P6OToNyGrwaqwU6Mnp7/yjMyZtB/Lp38QEWb6A9JPXWb8Q+V4jlpHr9WrHEJ+J1whDwabVQYfFvFhl5C4hY954U8jwhdtS6HE7G7M0DlC+6issJxKB5ZY2AKNmTwZGl8jy6Ob3yRJIvVIM/c90Xtdy6+xN24BD+dA1BadU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565021695; 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:ARC-Authentication-Results; bh=2lAOfVXosSg+qeIvHB4FuI64J+KW1PdsaZYDIQcOzVI=; b=XWpdjTr8AI3/F0bwS/uTKzFXADOKNVHfR2Zu96NYACwD0oO0vfcT8Cy8x2n3aRkIjB8cKpfxufPBpCM+7e+Fxji3295mrW/L6+60dVO1fO9H3/E0TaGqt0cIQ5GImsagRO40lsG54k4venKrk/oInfArJiZQcUxcJnWv1olBn7Q= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565021695527657.7521657714428; Mon, 5 Aug 2019 09:14:55 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 5121EEB9CB; Mon, 5 Aug 2019 16:14:54 +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 200E9166A0; Mon, 5 Aug 2019 16:14: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 D660318005A0; Mon, 5 Aug 2019 16:14:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x75GEdDM026328 for ; Mon, 5 Aug 2019 12:14:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0F53960A97; Mon, 5 Aug 2019 16:14:39 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-137.brq.redhat.com [10.40.204.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82034608C1 for ; Mon, 5 Aug 2019 16:14:38 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 5 Aug 2019 18:14:21 +0200 Message-Id: <26f71a831ad81bbc5fe52d22bb1bc97eb0c6f04d.1565021239.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/5] virfirmware: Expose and define autoptr for virFirmwareFree 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 05 Aug 2019 16:14:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This function frees a _virFirmware struct. So far, it doesn't need to be called from outside of the module, but this will change shortly. In the light of recent VIR_DEFINE_AUTOPTR_FUNC() additions, do the same to virFirmwareFree(). Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virfirmware.c | 2 +- src/util/virfirmware.h | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c323f679b3..c66161496e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2036,6 +2036,7 @@ virFirewallDZoneExists; =20 =20 # util/virfirmware.h +virFirmwareFree; virFirmwareFreeList; virFirmwareParse; virFirmwareParseList; diff --git a/src/util/virfirmware.c b/src/util/virfirmware.c index f41e000447..b4747bd346 100644 --- a/src/util/virfirmware.c +++ b/src/util/virfirmware.c @@ -31,7 +31,7 @@ VIR_LOG_INIT("util.firmware"); =20 =20 -static void +void virFirmwareFree(virFirmwarePtr firmware) { if (!firmware) diff --git a/src/util/virfirmware.h b/src/util/virfirmware.h index ed59f34102..30bcd21fa4 100644 --- a/src/util/virfirmware.h +++ b/src/util/virfirmware.h @@ -31,6 +31,11 @@ struct _virFirmware { }; =20 =20 +void +virFirmwareFree(virFirmwarePtr firmware); + +VIR_DEFINE_AUTOPTR_FUNC(virFirmware, virFirmwareFree); + void virFirmwareFreeList(virFirmwarePtr *firmwares, size_t nfirmwares); =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list