1412202 Unchecked return value
If the function returns an error value, the error value may be
mistaken for a normal value.
In lttng_tracker_list_destroy: Value returned from a function is not
checked for errors before being used (CWE-252)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I85c994440bc2cd5df0545fd1364dab462f98bc1c
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);
}