From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A7BDAA0A0C; Fri, 9 Jul 2021 05:16:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97D7341661; Fri, 9 Jul 2021 05:16:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8EF4240143; Fri, 9 Jul 2021 05:16:14 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10039"; a="209601120" X-IronPort-AV: E=Sophos;i="5.84,225,1620716400"; d="scan'208";a="209601120" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 20:16:13 -0700 X-IronPort-AV: E=Sophos;i="5.84,225,1620716400"; d="scan'208";a="487897526" Received: from unknown (HELO localhost.localdomain) ([10.240.183.93]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 20:16:11 -0700 From: dapengx.yu@intel.com To: Haiyue Wang Cc: dev@dpdk.org, Dapeng Yu , stable@dpdk.org Date: Fri, 9 Jul 2021 11:14:59 +0800 Message-Id: <20210709031459.864943-1-dapengx.yu@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210709023022.847686-1-dapengx.yu@intel.com> References: <20210709023022.847686-1-dapengx.yu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix using heap pointer after free X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Dapeng Yu The original code use a heap pointer after it is freed. This patch fix it. Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu --- V2: * Simplify the patch according to maintainer's comment: only one "pmd_flow" in the list, so just "break;" is fine. --- drivers/net/ixgbe/ixgbe_flow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 0b10e91a9b..511b612f7f 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -3437,6 +3437,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev, TAILQ_REMOVE(&ixgbe_flow_list, ixgbe_flow_mem_ptr, entries); rte_free(ixgbe_flow_mem_ptr); + break; } } rte_free(flow); -- 2.27.0