Fix: lttng: add-trigger: leak of argpar state
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 26 Feb 2021 19:09:16 +0000 (14:09 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 4 Mar 2021 16:59:19 +0000 (11:59 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I7f4fc2fa5b14c7269b65c4dde9daa9688032c1c1

src/bin/lttng/commands/add_trigger.c

index 74bb2b2aa2e4d9c2ad11e078431074ad570b39d6..0c714d84962bcaf0d9a1b697bba27de0fefa1dc4 100644 (file)
@@ -1117,6 +1117,7 @@ error:
        argpar_item_destroy(item);
 end:
        free(error);
+       argpar_state_destroy(state);
        return action;
 }
 
This page took 0.026329 seconds and 4 git commands to generate.