]> git.lttng.org Git - lttng-tools.git/commit
Fix: sessiond: cmd_add_ctx: leak of internal channel members
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Nov 2024 15:27:10 +0000 (15:27 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Nov 2024 17:05:50 +0000 (17:05 +0000)
commit80dc2b8e4c1477517080d028ee2fd316f0306c93
tree4ee04df9994f504c0b451226aca97041c3749af8
parent172c2a2b66a69841792bbdf46a498a017ff62092
Fix: sessiond: cmd_add_ctx: leak of internal channel members

lttng_channel instances must be released using channel_attr_destroy.
However, an error path of cmd_add_ctx uses free() directly, which causes
internal structures of lttng_channel to be leaked.

Wrap the lttng_channel instance to use a unique_ptr which invokes
channel_attr_destroy on release.

Change-Id: I77443c8a57475437dbb11792869e70840680492f
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.cpp
This page took 0.02953 seconds and 4 git commands to generate.