From: Jérémie Galarneau Date: Fri, 26 Feb 2021 19:02:55 +0000 (-0500) Subject: Fix: lttng: add-trigger: leak of max_size_arg argument X-Git-Tag: v2.13.0-rc1~305 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=f6b73530e969cb5bde9bc069f72ceec932bc86ef Fix: lttng: add-trigger: leak of max_size_arg argument 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 --- 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;