From 97abbc84fe032ca8d7cce7b8e64200981ffa6966 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 26 Feb 2021 13:47:22 -0500 Subject: [PATCH] Fix: lttng: add-trigger: leak of argpar_item MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1447047 Resource leak The system resource will not be reclaimed and reused, reducing the future availability of the resource. In handle_action_simple_session: Leak of memory or pointers to system resources (CWE-404) Signed-off-by: Jérémie Galarneau Change-Id: I5fa5864411908a6da87477b019f3dcee1c1b231c --- src/bin/lttng/commands/add_trigger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng/commands/add_trigger.c b/src/bin/lttng/commands/add_trigger.c index 9d013122d..2a7b29d52 100644 --- a/src/bin/lttng/commands/add_trigger.c +++ b/src/bin/lttng/commands/add_trigger.c @@ -1114,6 +1114,7 @@ error: lttng_action_destroy(action); action = NULL; free(error); + argpar_item_destroy(item); end: return action; } @@ -1440,6 +1441,7 @@ end: free(data_url_arg); free(snapshot_output); argpar_state_destroy(state); + argpar_item_destroy(item); return action; } -- 2.34.1