This addresses the following Coverity warnings:
Error: CPPCHECK_WARNING (CWE-404): [#def16]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: error[resourceLeak]: Resource leak: fp
# 273| }
# 274| }
# 275|-> }
# 276|
# 277| void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){
Error: RESOURCE_LEAK (CWE-772): [#def17]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: var_assign: Assigning: "fp" = storage returned from "fopen("timing_greedy", "w")".
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:272: noescape: Resource "fp" is not freed or pointed-to in "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.
# 273| }
# 274| }
# 275|-> }
# 276|
# 277| void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){
Related to #1464.
fprintf(fp,"%f %f %f\n", (real) (clock() - start)/(CLOCKS_PER_SEC), norm1[0], norm1[2]);
}
}
+ fclose(fp);
}
void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){