Fix: sessiond: error accounting: unchecked lttng_ht_del return value
[lttng-tools.git] / src / bin / lttng-sessiond / event-notifier-error-accounting.c
index 6837fe8f34de7ece5b734b4aeeaf168f19f9ac3f..035f3a03676fe1cfc2d663dd1497e021e731be84 100644 (file)
@@ -1003,6 +1003,7 @@ void event_notifier_error_accounting_unregister_event_notifier(
        lttng_ht_lookup(error_counter_indexes_ht, &tracer_token, &iter);
        node = lttng_ht_iter_get_node_u64(&iter);
        if (node) {
+               int del_ret;
                struct index_ht_entry *index_entry = caa_container_of(
                                node, typeof(*index_entry), node);
                enum lttng_index_allocator_status index_alloc_status;
@@ -1023,7 +1024,8 @@ void event_notifier_error_accounting_unregister_event_notifier(
                        /* Don't exit, perform the rest of the clean-up. */
                }
 
-               lttng_ht_del(error_counter_indexes_ht, &iter);
+               del_ret = lttng_ht_del(error_counter_indexes_ht, &iter);
+               assert(!del_ret);
                call_rcu(&index_entry->rcu_head, free_index_ht_entry);
        }
 
This page took 0.023795 seconds and 4 git commands to generate.