Browse Source

sc_hypervisor: make sure to free sched_ctxs_child in _consider_max_for_children()

Samuel Pitoiset 9 years ago
parent
commit
24be4e8ea8
1 changed files with 1 additions and 3 deletions
  1. 1 3
      sc_hypervisor/src/policies_utils/speed.c

+ 1 - 3
sc_hypervisor/src/policies_utils/speed.c

@@ -284,9 +284,7 @@ void _consider_max_for_children(unsigned sched_ctx, unsigned consider_max)
 	int s;
 	for(s = 0; s < nsched_ctxs_child; s++)
 		_consider_max_for_children(sched_ctxs_child[s], consider_max);
-	if(nsched_ctxs_child > 0)
-		free(sched_ctxs_child);
-	return;
+	free(sched_ctxs_child);
 }
 
 void sc_hypervisor_check_if_consider_max(struct types_of_workers *tw)