1
1

Fix issues identified by Coverity.

Этот коммит содержится в:
George Bosilca 2015-08-08 16:41:30 -04:00
родитель acf64b20c7
Коммит 0a91d7af4d
3 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -480,19 +480,17 @@ tree_t *kpartition_build_tree_from_topology(tm_topology_t *topology,double **com
/* we assume all objects have the same arity*/
/* assign the root of the tree*/
root = (tree_t*) MALLOC (sizeof(tree_t));
root->id = 0;
/*build the tree downward from the root*/
kpartition_build_level_topology(root, &com_mat, N+K, depth, topology, local_vertices,
constraints, nb_constraints, obj_weight, com_speed);
constraints, nb_constraints, obj_weight, com_speed);
/*print_1D_tab(local_vertices,K+N);*/
if(verbose_level>=INFO)
printf("Build (bottom-up) tree done!\n");
FREE(local_vertices);

Просмотреть файл

@ -272,7 +272,7 @@ int build_binding_constraints(char *filename, int **ptab)
n++;
}
tab = (int*)MALLOC(n*sizeof(int));
tab = (int*)MALLOC((n+1)*sizeof(int));
rewind(pf);
fgets(line, LINE_SIZE, pf);

Просмотреть файл

@ -126,10 +126,11 @@ void FREE_tab_child(tree_t *tree)
void FREE_non_constraint_tree(tree_t *tree)
{
FREE_list_child(tree);
int free_tree = tree->dumb;
FREE_tab_child(tree);
FREE(tree);
FREE_list_child(tree);
if(free_tree)
FREE(tree);
}
void FREE_constraint_tree(tree_t *tree)
@ -1458,8 +1459,6 @@ tree_t *build_level_topology(tree_t *tab_node, affinity_mat_t *aff_mat,int arity
FREE(new_aff_mat);
FREE(new_obj_weight);
FREE(new_obj_weight);
return res;
}