From nobody Mon Feb 9 00:56:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620201766; cv=none; d=zohomail.com; s=zohoarc; b=Hhp1npbHhv82hANNFYOykaqlNlzOHDlqwBZy+kthy4JO+6ZH/UTmLOpIwIGZLYZ5wuxnpk+K6GKoDBFYhCeBrPs4hdo1hWkOzyKyZFRJGyZEEqXnKw7peeIH6OC560tQrH/feG22SF9Rr/MNNGuOdwHHaGoMQE+8oWHTW7ECzuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620201766; 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=5rGvRFoIGVo+aoiHhznUt31HZSm3KeDO7tF/jiekyLY=; b=DUbRVxN2HJAopLuRURaBKeRuNfyWBSUmV4iEsBiAe2zc7a+S8JLMx+TEiTmKoRuR3FVOy6agAUhIKBWS8aGDyUKWHlysQpUfvqKZrpSnFnnKNsyJLYetPQv8U7sjjOxpupQsA48SG6kryFvrQFFhUSyROyGfhPhrEzE4NoZQYns= 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 1620201766277390.37879496003256; Wed, 5 May 2021 01:02:46 -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-235-d_3QKiBmMnKkisThX62B8A-1; Wed, 05 May 2021 04:02:43 -0400 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 26CCF805EFF; Wed, 5 May 2021 08:02:37 +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 E5CDB131E3; Wed, 5 May 2021 08:02:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D02B4180B463; Wed, 5 May 2021 08:02:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14582Xfp007794 for ; Wed, 5 May 2021 04:02:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id BEB5B5D9E3; Wed, 5 May 2021 08:02:33 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E6BC5D9E2 for ; Wed, 5 May 2021 08:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620201765; 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=5rGvRFoIGVo+aoiHhznUt31HZSm3KeDO7tF/jiekyLY=; b=S+RALks0dv6czduxQenbtr7aXAS26OvVRd+wMTjce/+1mTZD3Sv8LegcBEjaYQw2mgbhJD tnwwZzEUQJfbyAc14oKABF9Xwb48pPVwcZn7VK6jjqfKWTX0J1d7iI25Pwdyy8580LTPPS MK2C9w+VKPhMu8z9gCVyEXViEeUZiXE= X-MC-Unique: d_3QKiBmMnKkisThX62B8A-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/5] virCapabilitiesHostNUMAInitReal: Free @cpus properly Date: Wed, 5 May 2021 10:02:21 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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" The @cpus variable is an array of structs in which each item contains a virBitmap member. As such it is not enough to just VIR_FREE() the array - each bitmap has to be freed too. Signed-off-by: Michal Privoznik --- src/conf/capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 084e09286d..4d509a6d28 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -1648,6 +1648,7 @@ virCapabilitiesHostNUMAInitReal(virCapsHostNUMA *caps) =20 cleanup: virBitmapFree(cpumap); + virCapabilitiesClearHostNUMACellCPUTopology(cpus, ncpus); VIR_FREE(cpus); VIR_FREE(siblings); VIR_FREE(pageinfo); --=20 2.26.3