X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=4540177941faf9e30f610caf448ff6728c486a45;hp=372a71dad1d2579f4cd329f9cd97180c867d52f7;hb=050dd63950efb32bc79cdb68866792d4f808a1b0;hpb=ba8fcece7e8f4eb0f5f4345232a88687aff7919b diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 372a71dad..454017794 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -18,8 +18,7 @@ #include #include #include -#include -#include +#include #include "../command.h" @@ -273,7 +272,7 @@ static void print_userspace_probe_location(struct lttng_event *event) case LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION: { const char *function_name; - const char *binary_path; + char *binary_path; MSG("%sType: Function", indent8); function_name = lttng_userspace_probe_location_function_get_function_name(location); @@ -292,12 +291,14 @@ static void print_userspace_probe_location(struct lttng_event *event) 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; - const char *binary_path; + char *binary_path; MSG("%sType: Tracepoint", indent8); probe_name = lttng_userspace_probe_location_tracepoint_get_probe_name(location); @@ -313,6 +314,8 @@ static void print_userspace_probe_location(struct lttng_event *event) MSG("%sLookup method: INVALID LOOKUP TYPE ENCOUNTERED", indent8); break; } + + free(binary_path); break; } default: