X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=654cb6f11028ba7bce77d286cc0b47b41d1cfbf5;hb=a4eb26f0f09cd6d031166329a7d5d7b5d40408a6;hp=372a71dad1d2579f4cd329f9cd97180c867d52f7;hpb=e9e983b6eb739f4d2edc9ed58d85081262d07453;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 372a71dad..654cb6f11 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2020 Jérémie Galarneau * * SPDX-License-Identifier: GPL-2.0-only @@ -273,7 +273,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 +292,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 +315,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: