From: erg Date: Mon, 16 Nov 2009 20:41:35 +0000 (+0000) Subject: Fixes for bug 1816 X-Git-Tag: LAST_LIBGRAPH~32^2~1563 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3ca34f094b8612e2f698888d18262cd44f50238;p=graphviz Fixes for bug 1816 --- diff --git a/lib/neatogen/constrained_majorization.c b/lib/neatogen/constrained_majorization.c index 57e5318af..aecf84a69 100644 --- a/lib/neatogen/constrained_majorization.c +++ b/lib/neatogen/constrained_majorization.c @@ -301,6 +301,7 @@ stress_majorization_with_hierarchy( fp = fopen(FILENAME, "wb"); fwrite(lap2, sizeof(float), lap_length, fp); fclose(fp); + fp = NULL; } #endif @@ -481,6 +482,8 @@ stress_majorization_with_hierarchy( free (lap1); #ifdef NONCORE } + if (fp) + fclose (fp); #endif free (ordering); diff --git a/lib/neatogen/overlap.c b/lib/neatogen/overlap.c index 1504bb5bd..ca1e67ec8 100644 --- a/lib/neatogen/overlap.c +++ b/lib/neatogen/overlap.c @@ -507,6 +507,7 @@ void remove_overlap(int dim, SparseMatrix A, int m, real *x, real *label_sizes, {FILE*fp; fp = fopen("/tmp/m","w"); if (A) export_embedding(fp, dim, A, x, label_sizes); + fclose(fp); } #endif #ifdef TIME