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 C82F1A04A3 for ; Sat, 23 May 2020 13:21:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96A761D692; Sat, 23 May 2020 13:21:24 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id D861131FC; Sat, 23 May 2020 13:21:21 +0200 (CEST) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 88414EFD26914AE9E3BE; Sat, 23 May 2020 19:21:20 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Sat, 23 May 2020 19:21:12 +0800 From: wangyunjian To: CC: , , Yunjian Wang , Date: Sat, 23 May 2020 19:21:11 +0800 Message-ID: <1590232871-21464-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [dpdk-dev] [PATCH] test-pmd: fix memory leaks when mtr policer actions update fails 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 Fix memory leaks reported by Coverity. Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang --- app/test-pmd/cmdline_mtr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c index caa7e9864..ee16244de 100644 --- a/app/test-pmd/cmdline_mtr.c +++ b/app/test-pmd/cmdline_mtr.c @@ -1262,6 +1262,7 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result, ret = rte_mtr_policer_actions_update(port_id, mtr_id, action_mask, actions, &error); if (ret != 0) { + free(actions); print_err_msg(&error); return; } -- 2.23.0