Fix: leak of trace_path on error in ust_app_snapshot_record
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Sep 2019 15:22:39 +0000 (11:22 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Sep 2019 16:23:02 +0000 (12:23 -0400)
commitaffce97eaac76f77a3c83b1909d558b54e9a498f
treedf6532c5fce58fd919b3926607cbe3ced7235b3a
parent0ccc041129a301ccfea4624755d21fbd2e2625de
Fix: leak of trace_path on error in ust_app_snapshot_record

trace_path is leaked in some error paths of ust_app_snapshot_record().
Lift trace_path to the function's scope and free it whenever it is not
NULL. This is not clean, but this function should be cleaned-up in a
separate patch.

Moreover, this fixes a use after free in the PER_PID-case as
trace_path is free'd when a channel is not found.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c
This page took 0.028513 seconds and 5 git commands to generate.