From: Kevin Day Date: Fri, 12 Jul 2024 03:33:15 +0000 (-0500) Subject: Bugfix: Incorrect thread unlock in controller_rule_process(). X-Git-Tag: 0.6.11~23 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=7149bbbe08d937df5234633e6a61c9e9f7394934;p=fll Bugfix: Incorrect thread unlock in controller_rule_process(). When the lock is grabbed but a failure occurs an if condition handles that case. After that block is a second block that then attempts to unlock that same lock. Given that the lock failed, this lock cannot be in a locked state. --- diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 38d1875..1729632 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -2654,12 +2654,7 @@ extern "C" { return status; } - status = F_true; - } - - if (status == F_true) { - found = F_true; - + status = found = F_true; dependency = global.thread->processs.array[id_dependency]; status_lock = controller_lock_read_process(process, global.thread, &dependency->active); @@ -2689,9 +2684,6 @@ extern "C" { } } } - else { - f_thread_unlock(&global.thread->lock.process); - } if (status != F_true) { found = F_false;