]> Kevux Git Server - fll/commitdiff
Bugfix: Incorrect thread unlock in controller_rule_process().
authorKevin Day <Kevin@kevux.org>
Fri, 12 Jul 2024 03:33:15 +0000 (22:33 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 12 Jul 2024 03:33:15 +0000 (22:33 -0500)
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.

level_3/controller/c/rule/private-rule.c

index 38d18751e2b6a8a29a5994960a24cc2505f85736..1729632dfc841234567d8aaa61a08a0301dfc5c1 100644 (file)
@@ -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;