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>
Thu, 19 Sep 2019 19:31:48 +0000 (15:31 -0400)
commit9cb4b50c55c0266c7f6de0b033bd59df0fdedd70
tree2ebc9247ee7b65953e8ce0e3105de86c02c726e1
parent49f9e88d358c61f457d918555daf176222554133
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.025945 seconds and 4 git commands to generate.