/*
- * 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, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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 _LGPL_SOURCE
* Find the channel name for the given kernel session.
*/
struct ltt_kernel_channel *trace_kernel_get_channel_by_name(
- char *name, struct ltt_kernel_session *session)
+ const char *name, struct ltt_kernel_session *session)
{
struct ltt_kernel_channel *chan;
lks->metadata = NULL;
CDS_INIT_LIST_HEAD(&lks->channel_list.head);
+ lks->tracker_pid = process_attr_tracker_create();
+ if (!lks->tracker_pid) {
+ goto error;
+ }
+ lks->tracker_vpid = process_attr_tracker_create();
+ if (!lks->tracker_vpid) {
+ goto error;
+ }
+ lks->tracker_uid = process_attr_tracker_create();
+ if (!lks->tracker_uid) {
+ goto error;
+ }
+ lks->tracker_vuid = process_attr_tracker_create();
+ if (!lks->tracker_vuid) {
+ goto error;
+ }
+ lks->tracker_gid = process_attr_tracker_create();
+ if (!lks->tracker_gid) {
+ goto error;
+ }
+ lks->tracker_vgid = process_attr_tracker_create();
+ if (!lks->tracker_vgid) {
+ goto error;
+ }
lks->consumer = consumer_create_output(CONSUMER_DST_LOCAL);
if (lks->consumer == NULL) {
goto error;
return lks;
error:
+ process_attr_tracker_destroy(lks->tracker_pid);
+ process_attr_tracker_destroy(lks->tracker_vpid);
+ process_attr_tracker_destroy(lks->tracker_uid);
+ process_attr_tracker_destroy(lks->tracker_vuid);
+ process_attr_tracker_destroy(lks->tracker_gid);
+ process_attr_tracker_destroy(lks->tracker_vgid);
free(lks);
alloc_error:
/* Wipe consumer output object */
consumer_output_put(session->consumer);
+ process_attr_tracker_destroy(session->tracker_pid);
+ process_attr_tracker_destroy(session->tracker_vpid);
+ process_attr_tracker_destroy(session->tracker_uid);
+ process_attr_tracker_destroy(session->tracker_vuid);
+ process_attr_tracker_destroy(session->tracker_gid);
+ process_attr_tracker_destroy(session->tracker_vgid);
+
free(session);
}