From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C02105320 for ; Sun, 22 Jan 2017 09:24:55 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 22 Jan 2017 10:24:55 +0200 Received: from arch010.mtl.labs.mlnx (arch010.mtl.labs.mlnx [10.7.12.210]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v0M8OsAD016606; Sun, 22 Jan 2017 10:24:54 +0200 Received: from arch010.mtl.labs.mlnx (localhost [127.0.0.1]) by arch010.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id v0M8OsNQ023765; Sun, 22 Jan 2017 10:24:54 +0200 Received: (from root@localhost) by arch010.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id v0M8OlF0023760; Sun, 22 Jan 2017 10:24:47 +0200 From: Shahaf Shuler To: adrien.mazarguil@6wind.com Cc: dev@dpdk.org, stable@dpdk.org Date: Sun, 22 Jan 2017 10:24:47 +0200 Message-Id: <1485073487-23724-1-git-send-email-shahafs@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix memory leak when parsing device params 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: , X-List-Received-Date: Sun, 22 Jan 2017 08:24:56 -0000 in case of an error argument list is not freed. Fixes: e72dd09b614e ("net/mlx5: add support for configuration through kvargs") CC: stable@dpdk.org Signed-off-by: Shahaf Shuler --- drivers/net/mlx5/mlx5.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 8da29d2..d527e5b 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -339,8 +339,10 @@ if (rte_kvargs_count(kvlist, params[i])) { ret = rte_kvargs_process(kvlist, params[i], mlx5_args_check, priv); - if (ret != 0) + if (ret != 0) { + rte_kvargs_free(kvlist); return ret; + } } } rte_kvargs_free(kvlist); -- 1.8.3.1