]> granicus.if.org Git - graphviz/commitdiff
memory leak
authorDonald Caldwell <dfwc@research.att.com>
Mon, 3 Oct 2011 14:38:47 +0000 (10:38 -0400)
committerDonald Caldwell <dfwc@research.att.com>
Mon, 3 Oct 2011 14:38:47 +0000 (10:38 -0400)
replicated Yifans memory leak fix in call_tri

lib/neatogen/call_tri.c

index 173dda11545c444b9661852354dbb3f44efc9d8c..4599e56cd7d049910ebce629a444b7b4cf87531f 100644 (file)
@@ -57,8 +57,10 @@ SparseMatrix call_tri(int n, int dim, real * x)
        SparseMatrix_coordinate_form_add_entries(A, 1, &i, &i, &one);
     }
     B = SparseMatrix_from_coordinate_format(A);
-    B = SparseMatrix_symmetrize(B, FALSE);
     SparseMatrix_delete(A);
+    A = SparseMatrix_symmetrize(B, FALSE);
+    SparseMatrix_delete(B);
+    B = A;
 
     free (edgelist);
     free (xv);