Fix: lttng: track: leaked command parameter
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 15 Apr 2022 04:35:35 +0000 (00:35 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 May 2022 14:24:41 +0000 (10:24 -0400)
==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 <jeremie.galarneau@efficios.com>
Change-Id: Ibafcaf42ad4f842b3fa74cf91dc5ecc8acb3487d

src/bin/lttng/commands/track-untrack.c

index 3b520d1e7d955065770d85ec57e9f539745c94c3..2c940a2b2bc1a3455e77bc399333b56ca9da661e 100644 (file)
@@ -88,7 +88,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)
This page took 0.02644 seconds and 4 git commands to generate.