From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34965A09EE; Tue, 15 Dec 2020 09:49:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 19536C96A; Tue, 15 Dec 2020 09:48:57 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 445832142 for ; Tue, 15 Dec 2020 09:48:55 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 15 Dec 2020 10:48:50 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BF8mc0U019593; Tue, 15 Dec 2020 10:48:50 +0200 From: Michael Baum To: dev@dpdk.org Cc: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , stable@dpdk.org Date: Tue, 15 Dec 2020 08:48:32 +0000 Message-Id: <1608022112-13036-2-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1608022112-13036-1-git-send-email-michaelba@nvidia.com> References: <1608022112-13036-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: fix Tx queue creation error flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" In Tx queue creation, there are two validations for the Tx configuration. When one of them fails, the MR btree memory was not freed what caused a memory leak. Free it. Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_txq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index d96abef..b81bb4a 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -1146,6 +1146,7 @@ struct mlx5_txq_ctrl * LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next); return tmpl; error: + mlx5_mr_btree_free(&tmpl->txq.mr_ctrl.cache_bh); mlx5_free(tmpl); return NULL; } -- 1.8.3.1