From nobody Tue Apr 7 21:44:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1773242575; cv=none; d=zohomail.com; s=zohoarc; b=k71nwPYI1Yb0fZvxIP78ERe8VChDVlfpJEs7Mm3Knl/7rHAK2l34WUwCcUvOX4WBShanM0yLjqrSYDV8l5X+4C9i9xp2UUgYBj9iAVhLbLynSrgeo9KtcoAMi4Cj+kTVWZC6BYbhMFlMn9QsXC6NOvwWhVVPb4jk0VJr2GONwyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773242575; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wR+hUPyzcoaLr/0kiZZS1flGn03HnEHVpcuXjPmwacA=; b=j2SOPMOyykRCmOB7SUaBu86itoIZo26tv9nMLSRpUm1Q5R07Vmk0tm9G/Pweh2UyOZneV+G5ivLLWmhwcH0/dqQR1G4rGmtm3PyxGyin9g8m0eWz/0+/cl86WSxO9Dcr/uxvoigMXK5PFAQ8slTaETQhfz7W4EhyNCefPR/jJ10= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773242575017235.70355721807812; Wed, 11 Mar 2026 08:22:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0LBL-0007r6-5K; Wed, 11 Mar 2026 11:09:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0L9M-0003x7-9j; Wed, 11 Mar 2026 11:07:06 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0L9K-0004xr-Df; Wed, 11 Mar 2026 11:07:03 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 5B04A191E89; Wed, 11 Mar 2026 18:04:41 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 472C537C2CA; Wed, 11 Mar 2026 18:05:19 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773241481; bh=AREQ/dFnXzezlRlc40BNW1VnJ2gwDKJL+a4jQQus1S0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DCySK9BW6wmyKWSutjEWEw7veRgdOBWOWTnUL8exww5M3XdXH3D8f/B0F5+IeC/RQ OXidWZ934wXjnusW46CwLvEULuVBW/lbTS6wES3nOsWnBNc6LFP0nKCoCKyCww+piH 6G7fAZ14mP4t2K26dOuEWse+PwiYpp+QWY81SM7LqU56xThjVmMoTGSlW3tOVugS4H bfFuJGp++EOgpVhhZ3L9qTdCmoYA6pHqbF6C4qu6p9qaD0lSN40gKle8rWFmK7LHY5 sw+ufVK0XF60M37yT+8oge7uWN2ZrgN+WXwc6yBZ6r3FSPBJNNmb8nzhulavMwk5Iw xMKVdiQb4ZwEw== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Alex Bradbury , Manos Pitsidianakis , Pierrick Bouvier , Michael Tokarev Subject: [Stable-10.1.5 06/46] contrib/plugins/hotblocks: Correctly free sorted counts list Date: Wed, 11 Mar 2026 18:02:42 +0300 Message-ID: <20260311150327.1084669-6-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1773242577017158500 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury g_list_free should be passed the head of the list. Signed-off-by: Alex Bradbury Reviewed-by: Manos Pitsidianakis Reviewed-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/cf5a00136738b981a12270b76572e8d502= daf208.1753857212.git.asb@igalia.com Signed-off-by: Pierrick Bouvier (cherry picked from commit 90fabd5ddace6ffa5a62a5186201fd071b4e2b74) Signed-off-by: Michael Tokarev diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 98404b6885..d3dd23ed9f 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -73,15 +73,16 @@ static void exec_count_free(gpointer key, gpointer valu= e, gpointer user_data) static void plugin_exit(qemu_plugin_id_t id, void *p) { g_autoptr(GString) report =3D g_string_new("collected "); - GList *counts, *it; + GList *counts, *sorted_counts, *it; int i; =20 g_string_append_printf(report, "%d entries in the hash table\n", g_hash_table_size(hotblocks)); counts =3D g_hash_table_get_values(hotblocks); - it =3D g_list_sort_with_data(counts, cmp_exec_count, NULL); + sorted_counts =3D g_list_sort_with_data(counts, cmp_exec_count, NULL); =20 - if (it) { + if (sorted_counts) { + it =3D sorted_counts; g_string_append_printf(report, "pc, tcount, icount, ecount\n"); =20 for (i =3D 0; i < limit && it->next; i++, it =3D it->next) { @@ -94,7 +95,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) qemu_plugin_scoreboard_u64(rec->exec_count))); } =20 - g_list_free(it); + g_list_free(sorted_counts); } =20 qemu_plugin_outs(report->str); --=20 2.47.3