From: erg Date: Wed, 1 Feb 2006 17:30:17 +0000 (+0000) Subject: Zero out Agraphinfo_t on *_cleanup_graph so that graph can be X-Git-Tag: LAST_LIBGRAPH~32^2~6809 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78d50e12b9f3f126261cf1540071c139b38ac2d9;p=graphviz Zero out Agraphinfo_t on *_cleanup_graph so that graph can be passed to gvLayout again with core dumping. --- diff --git a/lib/circogen/circularinit.c b/lib/circogen/circularinit.c index 76fb62cee..2348f8157 100644 --- a/lib/circogen/circularinit.c +++ b/lib/circogen/circularinit.c @@ -340,4 +340,5 @@ void circo_cleanup(graph_t * g) circular_cleanup_node(n); } free(GD_neato_nlist(g)); + memset(&(g->u), 0, sizeof(Agraphinfo_t)); } diff --git a/lib/dotgen/dotinit.c b/lib/dotgen/dotinit.c index 8b6c64d46..dbd71edf7 100644 --- a/lib/dotgen/dotinit.c +++ b/lib/dotgen/dotinit.c @@ -157,6 +157,7 @@ dot_cleanup_graph(graph_t * g) for (c = 1; c <= GD_n_cluster(g); c++) { clust = GD_clust(g)[c]; + GD_cluster_was_collapsed(clust) = FALSE; dot_cleanup(clust); } @@ -166,6 +167,7 @@ dot_cleanup_graph(graph_t * g) free(GD_rank(g)[i].v); free(GD_rank(g)); } + memset(&(g->u), 0, sizeof(Agraphinfo_t)); } /* delete the layout (but retain the underlying graph) */ diff --git a/lib/fdpgen/fdpinit.c b/lib/fdpgen/fdpinit.c index 0c043fedb..57e7ed88c 100644 --- a/lib/fdpgen/fdpinit.c +++ b/lib/fdpgen/fdpinit.c @@ -177,6 +177,7 @@ static void fdp_cleanup_graph(graph_t * g) cleanup_subgs(g); free(GD_neato_nlist(g)); free(GD_alg(g)); + memset(&(g->u), 0, sizeof(Agraphinfo_t)); } void fdp_cleanup(graph_t * g) diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index a949f1b54..eb3b5bb8e 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -177,6 +177,7 @@ void neato_cleanup_graph(graph_t * g) { if (Nop || (Pack < 0)) free_scan_graph(g); + memset(&(g->u), 0, sizeof(Agraphinfo_t)); } void neato_cleanup(graph_t * g) diff --git a/lib/twopigen/twopiinit.c b/lib/twopigen/twopiinit.c index c22fcae18..1cb4726d3 100644 --- a/lib/twopigen/twopiinit.c +++ b/lib/twopigen/twopiinit.c @@ -155,6 +155,7 @@ static void twopi_cleanup_edge(edge_t * e) static void twopi_cleanup_graph(graph_t * g) { free(GD_neato_nlist(g)); + memset(&(g->u), 0, sizeof(Agraphinfo_t)); } void twopi_cleanup(graph_t * g)