From eb577e575d160eae08bcd9b7acf8a9d8fe795f89 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Mon, 25 May 2020 09:46:23 +0800 Subject: [PATCH] app/testpmd: fix memory leak on error path This patch fixes the resource leak issue. Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Ferruh Yigit --- 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 caa7e98644..ee16244de7 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.20.1