X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=654cb6f11028ba7bce77d286cc0b47b41d1cfbf5;hb=a4eb26f0f09cd6d031166329a7d5d7b5d40408a6;hp=70dc99b0afc55801067e6b224481977d597ba471;hpb=f953b297c44e58bf84afbe04abd758e63149f40b;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 70dc99b0a..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: @@ -1446,7 +1450,6 @@ static int list_channels(const char *channel_name) count = 0; } else { ret = CMD_SUCCESS; - WARN("No kernel channel"); goto error_channels; } break;