Long-outstanding commit. (Hopefully) Final version before running experiments for...
[distributedratelimiting.git] / drl / config.c
index 8b15cd2..42f4472 100644 (file)
@@ -79,10 +79,13 @@ int get_eligible_leaves(drl_instance_t *instance) {
 
         return ENOMEM;
     }
+    memset(leaves, 0, count * sizeof(leaf_t));
 
     for (i = 0; i < count; ++i) {
         leaves[i].xid = atoi(names[i]->d_name);
         leaves[i].parent = NULL;
+        leaves[i].drop_prob = 0.0;
+        leaves[i].delay = 0;
         
         free(names[i]);