Fix: client_list_element leak on failure to evaluate a condition
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.c
index 1793cac6b7e98804328ecc7f8d9fb29af5538beb..6777fd6dd1f3b34f228981bd4b9aaf30a27dd07e 100644 (file)
@@ -295,7 +295,7 @@ unsigned long lttng_condition_buffer_usage_hash(
 
                val = condition->threshold_ratio.value * (double) UINT32_MAX;
                hash ^= hash_key_u64(&val, lttng_ht_seed);
-       } else if (condition->threshold_ratio.set) {
+       } else if (condition->threshold_bytes.set) {
                uint64_t val;
 
                val = condition->threshold_bytes.value;
@@ -565,6 +565,7 @@ int notification_thread_client_subscribe(struct notification_client *client,
                        client, state)) {
                WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting.");
                ret = -1;
+               free(client_list_element);
                goto end_unlock;
        }
 
This page took 0.025516 seconds and 5 git commands to generate.