projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng: leak of userspace probe path on listing
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
list.c
diff --git
a/src/bin/lttng/commands/list.c
b/src/bin/lttng/commands/list.c
index 8f44b6a77300ce77391930cb5668615699c80fe1..fa7e044601822a710d425af40546d3d17d7f6590 100644
(file)
--- a/
src/bin/lttng/commands/list.c
+++ b/
src/bin/lttng/commands/list.c
@@
-279,7
+279,7
@@
static void print_userspace_probe_location(struct lttng_event *event)
case LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION:
{
const char *function_name;
case LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION:
{
const char *function_name;
- c
onst c
har *binary_path;
+ char *binary_path;
MSG("%sType: Function", indent8);
function_name = lttng_userspace_probe_location_function_get_function_name(location);
MSG("%sType: Function", indent8);
function_name = lttng_userspace_probe_location_function_get_function_name(location);
@@
-298,12
+298,14
@@
static void print_userspace_probe_location(struct lttng_event *event)
MSG("%sLookup method: INVALID LOOKUP TYPE ENCOUNTERED", indent8);
break;
}
MSG("%sLookup method: INVALID LOOKUP TYPE ENCOUNTERED", indent8);
break;
}
+
+ free(binary_path);
break;
}
case LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT:
{
const char *probe_name, *provider_name;
break;
}
case LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT:
{
const char *probe_name, *provider_name;
- c
onst c
har *binary_path;
+ char *binary_path;
MSG("%sType: Tracepoint", indent8);
probe_name = lttng_userspace_probe_location_tracepoint_get_probe_name(location);
MSG("%sType: Tracepoint", indent8);
probe_name = lttng_userspace_probe_location_tracepoint_get_probe_name(location);
@@
-319,6
+321,8
@@
static void print_userspace_probe_location(struct lttng_event *event)
MSG("%sLookup method: INVALID LOOKUP TYPE ENCOUNTERED", indent8);
break;
}
MSG("%sLookup method: INVALID LOOKUP TYPE ENCOUNTERED", indent8);
break;
}
+
+ free(binary_path);
break;
}
default:
break;
}
default:
This page took
0.023967 seconds
and
4
git commands to generate.