From: Jonathan Zheng Date: Fri, 17 Jan 2020 10:50:08 +0000 (+0000) Subject: fixed initial_positions segfault X-Git-Tag: stable_release_2.44.0~12^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63c3bb906bb5811f6265320de1c62194b4642035;p=graphviz fixed initial_positions segfault --- diff --git a/lib/neatogen/sgd.c b/lib/neatogen/sgd.c index f7e3ea95a..e71ccb24c 100644 --- a/lib/neatogen/sgd.c +++ b/lib/neatogen/sgd.c @@ -154,7 +154,7 @@ void sgd(graph_t *G, /* input graph */ int n = agnnodes(G); if (Verbose) { - fprintf(stderr, "calculating shortest paths:"); + fprintf(stderr, "calculating shortest paths and setting up stress terms:"); start_timer(); } // calculate how many terms will be needed as fixed nodes can be ignored @@ -175,7 +175,7 @@ void sgd(graph_t *G, /* input graph */ } } assert(offset == n_terms); - free(graph); + free_adjacency(graph); if (Verbose) { fprintf(stderr, " %.2f sec\n", elapsed_sec()); } @@ -213,7 +213,7 @@ void sgd(graph_t *G, /* input graph */ start_timer(); } int t; - rk_seed(0, &rstate); + rk_seed(0, &rstate); // TODO: get seed from graph for (t=0; t