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 D702DA09EE for ; Tue, 15 Dec 2020 09:48:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5774C9BC; Tue, 15 Dec 2020 09:48:58 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 42EC6A3 for ; Tue, 15 Dec 2020 09:48:54 +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-stable] [PATCH 2/2] net/mlx5: fix Tx queue creation error flow X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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