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 15A0EA034E; Thu, 24 Feb 2022 13:15:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D400A41155; Thu, 24 Feb 2022 13:15:13 +0100 (CET) Received: from smtp.tom.com (smtprz15.163.net [106.3.154.248]) by mails.dpdk.org (Postfix) with ESMTP id D031B4114D for ; Thu, 24 Feb 2022 13:15:12 +0100 (CET) Received: from my-app01.tom.com (my-app01.tom.com [127.0.0.1]) by freemail01.tom.com (Postfix) with ESMTP id 635771E8C1E0 for ; Thu, 24 Feb 2022 20:15:11 +0800 (CST) Received: from my-app01.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app01 (TOM SMTP Server) with SMTP ID 1363794858 for ; Thu, 24 Feb 2022 20:15:11 +0800 (CST) Received: from antispam3.tom.com (unknown [172.25.16.54]) by freemail01.tom.com (Postfix) with ESMTP id 4BFDB1E8C1DD for ; Thu, 24 Feb 2022 20:15:09 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1645704911; bh=oWoOTmXoiDVVdrx3l1Lsppp4rUwCQ/sY2TiF/4hWguA=; h=From:To:Subject:Date:From; b=mwC7qMQQmUkxojVpY1qS6vLsYb6so9La5hOxAzLzmvIIpw90YxYsIr510Sh4JCrl+ UYxf8n5AEoI0dx+GPD5p0F0JhzUa0xGnVqDY3VcTP/ROvlQdAGtab8PnWnONDqGcGl A0Q/t4MKjS7EHHSwgP5BXDFj1eapw2YbDts6YUEA= Received: from antispam3.tom.com (antispam3.tom.com [127.0.0.1]) by antispam3.tom.com (Postfix) with ESMTP id CDA809C1AEC for ; Thu, 24 Feb 2022 20:15:09 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam3.tom.com Received: from antispam3.tom.com ([127.0.0.1]) by antispam3.tom.com (antispam3.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M6UEiePIMww9 for ; Thu, 24 Feb 2022 20:15:09 +0800 (CST) Received: from haizhi-vm.localdomain (unknown [113.88.15.206]) by antispam3.tom.com (Postfix) with ESMTPA id DD9B89C1A35 for ; Thu, 24 Feb 2022 20:15:06 +0800 (CST) From: Tianli Lai To: dev@dpdk.org Subject: [PATCH] app/pdump: free mempool at cleanup resources Date: Thu, 24 Feb 2022 20:14:58 +0800 Message-Id: <1645704898-52464-1-git-send-email-laitianli@tom.com> X-Mailer: git-send-email 1.8.3.1 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 the mempool should be free when cleanup resources. Signed-off-by: Tianli Lai --- app/pdump/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/pdump/main.c b/app/pdump/main.c index 46f9d25..8101078 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -510,6 +510,10 @@ struct parse_val { rte_ring_free(pt->rx_ring); if (pt->tx_ring) rte_ring_free(pt->tx_ring); + if (pt->mp) { + rte_mempool_free(pt->mp); + pt->mp = NULL; + } } } -- 1.8.3.1