From: erg Date: Mon, 16 Nov 2009 21:02:21 +0000 (+0000) Subject: Fixes for bug 1816 X-Git-Tag: LAST_LIBGRAPH~32^2~1561 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03a304f211ccf53578f894083e72fc0aa328f9c2;p=graphviz Fixes for bug 1816 --- diff --git a/lib/neatogen/stress.c b/lib/neatogen/stress.c index 1e3988912..41710da63 100644 --- a/lib/neatogen/stress.c +++ b/lib/neatogen/stress.c @@ -1551,6 +1551,9 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re #ifdef ALTERNATIVE_STRESS_CALC double mat_stress; #endif +#ifdef NONCORE + FILE* fp = NULL; +#endif /************************************************* ** Computation of full, dense, unrestricted k-D ** @@ -1704,6 +1707,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re fp = fopen(FILENAME, "wb"); fwrite(lap2, sizeof(float), lap_length, fp); fclose(fp); + fp = NULL; } #endif @@ -1884,6 +1888,11 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re #endif /* WITH_CGRAPH */ } } +#ifdef NONCORE + if (fp) + fclose (fp); +#endif + free(coords[0]); free(coords);