-/* Copyright (c) 2011 David Goulet <david.goulet@polymtl.ca>
+/*
+ * Copyright (c) 2011 David Goulet <david.goulet@polymtl.ca>
*
* 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
* 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
/* 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;
}
}
return 0;
end:
+ ERR("%s", lttng_get_readable_code(ret));
return ret;
}
fclose(fp);
}
+ /* Allocated by lttng_ust_list_apps() */
+ free(pids);
+
return 0;
error: