Browse Source

Fix a bug in wait_for_objects.

coderain 5 years ago
parent
commit
59661c59c7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/src/object.c

+ 1 - 1
kernel/src/object.c

@@ -650,7 +650,7 @@ static sysret_t wait_for_objects(const handle_t *handles, void * const *paramete
         goto cleanup;
     }
 
-    memset(condition, 0, sizeof(wait_condition_t) + (count + 1) * sizeof(wait_condition_t*));
+    memset(condition, 0, sizeof(wait_condition_t) + count * sizeof(wait_condition_t*));
     condition->type = condition_type;
 
     for (i = 0; i < count; i++)