From f6b73530e969cb5bde9bc069f72ceec932bc86ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 26 Feb 2021 14:02:55 -0500 Subject: [PATCH 1/1] Fix: lttng: add-trigger: leak of max_size_arg argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1447046 Resource leak The system resource will not be reclaimed and reused, reducing the future availability of the resource. In handle_action_snapshot_session: Leak of memory or pointers to system resources (CWE-404) Signed-off-by: Jérémie Galarneau Change-Id: I7ac83565b486a4a1e2a4eeb4a89c8867284b0833 --- src/bin/lttng/commands/add_trigger.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng/commands/add_trigger.c b/src/bin/lttng/commands/add_trigger.c index eecda5014..bbba2d4d8 100644 --- a/src/bin/lttng/commands/add_trigger.c +++ b/src/bin/lttng/commands/add_trigger.c @@ -1441,6 +1441,7 @@ end: free(ctrl_url_arg); free(data_url_arg); free(snapshot_output); + free(max_size_arg); argpar_state_destroy(state); argpar_item_destroy(item); return action; -- 2.34.1