From cfaa204e7ab4317ee1efd1b430ed3ddc2633068a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 15 Apr 2022 00:35:35 -0400 Subject: [PATCH] Fix: lttng: track: leaked command parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ==1676099==ERROR: LeakSanitizer: detected memory leaks Direct leak of 5 byte(s) in 1 object(s) allocated from: #0 0x7f19429d9dd9 in __interceptor_malloc /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x7f19425342ad in poptGetNextOpt (/usr/lib/libpopt.so.0+0x82ad) Signed-off-by: Jérémie Galarneau Change-Id: Ibafcaf42ad4f842b3fa74cf91dc5ecc8acb3487d --- src/bin/lttng/commands/track-untrack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng/commands/track-untrack.cpp b/src/bin/lttng/commands/track-untrack.cpp index 8e9bec149..e311304f4 100644 --- a/src/bin/lttng/commands/track-untrack.cpp +++ b/src/bin/lttng/commands/track-untrack.cpp @@ -89,7 +89,7 @@ static void process_attr_command_init(struct process_attr_command_args *cmd, { cmd->process_attr = process_attr; cmd->all = false; - lttng_dynamic_pointer_array_init(&cmd->string_args, NULL); + lttng_dynamic_pointer_array_init(&cmd->string_args, free); } static void process_attr_command_fini(struct process_attr_command_args *cmd) -- 2.34.1