X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftracker.c;h=cff5af3a0612c750a431fea74e435fd0d5c89591;hb=25357057de5ae4dd2a572e8f9b893c1b90cbd60a;hp=38bf8a473d70530488e25a1142e72d449ca44fbb;hpb=e283e4a062cc16b5839a8a479e12498789320b5e;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/tracker.c b/src/bin/lttng-sessiond/tracker.c index 38bf8a473..cff5af3a0 100644 --- a/src/bin/lttng-sessiond/tracker.c +++ b/src/bin/lttng-sessiond/tracker.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2018 - Mathieu Desnoyers + * Copyright (C) 2018 Mathieu Desnoyers * - * 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 @@ -235,11 +225,14 @@ end: void lttng_tracker_list_destroy(struct lttng_tracker_list *tracker_list) { + int ret; + if (!tracker_list) { return; } lttng_tracker_list_reset(tracker_list); - cds_lfht_destroy(tracker_list->ht, NULL); + ret = cds_lfht_destroy(tracker_list->ht, NULL); + assert(!ret); free(tracker_list); } @@ -405,7 +398,6 @@ int lttng_tracker_id_lookup_string(enum lttng_tracker_type tracker_type, default: return LTTNG_ERR_INVALID; } - break; default: return LTTNG_ERR_INVALID; }