From nobody Sun Feb 8 04:57:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1585316708; cv=none; d=zohomail.com; s=zohoarc; b=QGKjMS0rMP+wsLj1VLM2CXSh7xC3G2SzBkUm1/ABHAUPTAIBGd53cQuRgUAUohbnVCM6HMy3tJrG51YHQAmWbRq9HSv8ynjkTV+Ko1d37KXCi28BY9K9sabFbBn68pFTWSl3533UtqapMnB+SOshqgrM1LxT6ny320PiYygbchg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585316708; 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=5xbhKYwety2XEukDB+zjgZfL2xsFxIidZPn4jXWT7Oc=; b=icZvidOFYHZiU8rb4o/SEgEEqTLvhddMH/fvDD6PmHTREx1VUMqXv3Tc6/+CzO7dw9y7h9Veu+W8SlRPeVFc58X/6fX3ER/UZOiEz3DAXuCkNnHDfxAPvpq3AyHTzST6y5FPW3SMQL8TwIAuyScaE1BzaBczF1/TX0dQn53l4UU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585316708093987.0510223438479; Fri, 27 Mar 2020 06:45:08 -0700 (PDT) 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-476-3uX9S8ReOZSRnN19sJSp_Q-1; Fri, 27 Mar 2020 09:45:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 373C6801A07; Fri, 27 Mar 2020 13:44:58 +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 0B5F1CDBEC; Fri, 27 Mar 2020 13:44: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 B407B944A0; Fri, 27 Mar 2020 13:44:57 +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 02RDiOsv006423 for ; Fri, 27 Mar 2020 09:44:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id D989F10027A3; Fri, 27 Mar 2020 13:44:24 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.40.192.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAABD1001925 for ; Fri, 27 Mar 2020 13:44:24 +0000 (UTC) Received: by rein.int.mamuti.net (Postfix, from userid 500) id 27E0E18F8BD; Fri, 27 Mar 2020 14:44:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585316706; 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=5xbhKYwety2XEukDB+zjgZfL2xsFxIidZPn4jXWT7Oc=; b=NZlX9kQYhG+3lVlxfLuS0KysuKyJxFzFA55D5kV+17DIWUfzs7WxjT4YoNf3A1tIXre6bS 4nvb2gD5YzF6KuBppXpATYGUYut8nha87Rs5Xr0qbqtzL0BrcYcSNWpTzrLaTAfGTAkCZk 6ptBnPlrRcz49u3wUY5PCb6xPoQ+mK8= X-MC-Unique: 3uX9S8ReOZSRnN19sJSp_Q-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 32/39] cpu_x86: Introduce virCPUx86SignaturesFree Date: Fri, 27 Mar 2020 14:44:01 +0100 Message-Id: <8ac38bee1a9851eb8d69c3eeeec962ebb38bcb8d.1585316580.git.jdenemar@redhat.com> In-Reply-To: References: 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.11 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" The function will be used for freeing virCPUx86Signatures structure introduced later in this series. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_x86.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 182d0da97c..a71b5ccacc 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -1090,6 +1090,13 @@ x86FeatureParse(xmlXPathContextPtr ctxt, } =20 =20 +static void +virCPUx86SignaturesFree(uint32_t *signatures) +{ + g_free(signatures); +} + + static int virCPUx86SignaturesCopy(virCPUx86ModelPtr dst, virCPUx86ModelPtr src) @@ -1149,7 +1156,7 @@ x86ModelFree(virCPUx86ModelPtr model) return; =20 g_free(model->name); - g_free(model->signatures); + virCPUx86SignaturesFree(model->signatures); virCPUx86DataClear(&model->data); g_free(model); } @@ -1414,7 +1421,7 @@ x86ModelParseSignatures(virCPUx86ModelPtr model, return n; =20 /* Remove inherited signatures. */ - VIR_FREE(model->signatures); + virCPUx86SignaturesFree(model->signatures); =20 model->nsignatures =3D n; if (VIR_ALLOC_N(model->signatures, n) < 0) --=20 2.26.0