Fix a bug in wait_for_objects.
authorcoderain <coderain@sdf.org>
Sat, 8 Sep 2018 18:04:36 +0000 (20:04 +0200)
committercoderain <coderain@sdf.org>
Sat, 8 Sep 2018 18:04:36 +0000 (20:04 +0200)
kernel/src/object.c

index 649c0d2ba2471c369a47370c45c57ef656363bcb..828922112650f9b0274e1a6177151d71aa1a63fd 100644 (file)
@@ -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++)