X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Flttng.c;h=62585528808125dbc3a65eb925448809ad5542fe;hp=188b13dd65ae974aff8c6c528b4c0e86bf3bde66;hb=ebafd2a5241f74a15c0e563af001b8d651962392;hpb=fac6795d6e2c60e79bdc7dab42da94d2025a57d3 diff --git a/lttng/lttng.c b/lttng/lttng.c index 188b13dd6..625855288 100644 --- a/lttng/lttng.c +++ b/lttng/lttng.c @@ -1,4 +1,5 @@ -/* Copyright (c) 2011 David Goulet +/* + * Copyright (c) 2011 David Goulet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +14,6 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * */ #define _GNU_SOURCE @@ -56,14 +56,12 @@ static int process_client_opt(void) /* Connect to the session daemon */ ret = lttng_connect_sessiond(); if (ret < 0) { - ERR("%s", lttng_get_readable_code(ret)); goto end; } if (opt_list_apps) { ret = process_opt_list_apps(); if (ret < 0) { - ERR("%s", lttng_get_readable_code(ret)); goto end; } } @@ -71,6 +69,7 @@ static int process_client_opt(void) return 0; end: + ERR("%s", lttng_get_readable_code(ret)); return ret; } @@ -105,6 +104,9 @@ static int process_opt_list_apps(void) fclose(fp); } + /* Allocated by lttng_ust_list_apps() */ + free(pids); + return 0; error: