From nobody Mon Apr 29 12:34:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508756867200666.5846687382079; Mon, 23 Oct 2017 04:07:47 -0700 (PDT) Received: from localhost ([::1]:38027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aaA-0004RH-D2 for importer@patchew.org; Mon, 23 Oct 2017 07:07:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aYZ-0003UA-Ns for qemu-devel@nongnu.org; Mon, 23 Oct 2017 07:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aYU-0006ku-6j for qemu-devel@nongnu.org; Mon, 23 Oct 2017 07:06:07 -0400 Received: from [120.132.1.243] (port=37762 helo=ucloud.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aYT-0006kE-PX for qemu-devel@nongnu.org; Mon, 23 Oct 2017 07:06:02 -0400 Received: by ucloud.localdomain (Postfix, from userid 0) id F3F41AE12B1; Tue, 24 Oct 2017 03:26:33 +0800 (CST) From: zhiyong.wu@ucloud.cn To: qemu-devel@nongnu.org Date: Tue, 24 Oct 2017 03:26:28 +0800 Message-Id: <1508786788-32557-1-git-send-email-zhiyong.wu@ucloud.cn> X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 120.132.1.243 Subject: [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhi Yong Wu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhi Yong Wu When hash table is created with g_hash_table_new_full(), the free function has been registered. So it isn't necessary since g_hash_table_remove_all() will call connection_destroy() for each connection struct automatically. Signed-off-by: Zhi Yong Wu --- net/colo.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/net/colo.c b/net/colo.c index 28ce7c8..668abb7 100644 --- a/net/colo.c +++ b/net/colo.c @@ -197,12 +197,6 @@ Connection *connection_get(GHashTable *connection_trac= k_table, trace_colo_proxy_main("colo proxy connection hashtable full," " clear it"); connection_hashtable_reset(connection_track_table); - /* - * clear the conn_list - */ - while (!g_queue_is_empty(conn_list)) { - connection_destroy(g_queue_pop_head(conn_list)); - } } =20 g_hash_table_insert(connection_track_table, new_key, conn); --=20 1.7.1