From: Jérémie Galarneau Date: Fri, 26 Feb 2021 19:09:16 +0000 (-0500) Subject: Fix: lttng: add-trigger: leak of argpar state X-Git-Tag: v2.13.0-rc1~303 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b78ef509112ca7621b75777e9f90c1e42233f278;p=lttng-tools.git Fix: lttng: add-trigger: leak of argpar state 1447049 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: I7f4fc2fa5b14c7269b65c4dde9daa9688032c1c1 --- diff --git a/src/bin/lttng/commands/add_trigger.c b/src/bin/lttng/commands/add_trigger.c index 74bb2b2aa..0c714d849 100644 --- a/src/bin/lttng/commands/add_trigger.c +++ b/src/bin/lttng/commands/add_trigger.c @@ -1117,6 +1117,7 @@ error: argpar_item_destroy(item); end: free(error); + argpar_state_destroy(state); return action; }