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 6C2D0A04B1 for ; Tue, 29 Sep 2020 15:44:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DB821D523; Tue, 29 Sep 2020 15:44:18 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 7A3361D523; Tue, 29 Sep 2020 15:44:15 +0200 (CEST) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8A315B53817AF5066926; Tue, 29 Sep 2020 21:44:12 +0800 (CST) Received: from localhost (10.174.185.168) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Tue, 29 Sep 2020 21:44:03 +0800 From: wangyunjian To: CC: , , , , , , Yunjian Wang , Date: Tue, 29 Sep 2020 21:44:00 +0800 Message-ID: X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.185.168] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [dpdk-dev] [PATCH] net/netvsc: fix txq leak in error path 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" From: Yunjian Wang In hn_dev_tx_queue_setup() allocated memory for txq, we should free it when error happens, otherwise it will lead to memory leak. Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang --- drivers/net/netvsc/hn_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 65f1abae5..8c94e7ee3 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -273,6 +273,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev, " (tx_free_thresh=%u port=%u queue=%u)\n", nb_desc - 3, tx_free_thresh, dev->data->port_id, queue_idx); + rte_free(txq); return -EINVAL; } -- 2.23.0