]> granicus.if.org Git - graphviz/commitdiff
Fixes for bug 1816
authorerg <devnull@localhost>
Mon, 16 Nov 2009 20:41:35 +0000 (20:41 +0000)
committererg <devnull@localhost>
Mon, 16 Nov 2009 20:41:35 +0000 (20:41 +0000)
lib/neatogen/constrained_majorization.c
lib/neatogen/overlap.c

index 57e5318afcee02fc9795ba4028fb6039231abb07..aecf84a695ca88e559c511f30ac8c64a47494bac 100644 (file)
@@ -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); 
index 1504bb5bd1f46ce5b86da0d1461487cdd6c25942..ca1e67ec88b3b6fe27108212ac1fcc12f6d3ba1d 100644 (file)
@@ -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