MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / graph_free

Function graph_free

tools/json-graph/src/jgflib.c:92–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static void graph_free(Graph g)
93{
94 /* free graph attributes: */
95 attrs_free(g->attrs);
96 /* free nodes: */
97 Node n = g->nodes;
98 while (n) {
99 Node save = n->next;
100 /* free node attributes: */
101 attrs_free(n->attrs);
102 free(n);
103 n = save;
104 }
105 /* free edges: */
106 Edge e = g->edges;
107 while (e) {
108 Edge save = e->next;
109 /* free edge attributes: */
110 attrs_free(e->attrs);
111 free(e);
112 e = save;
113 }
114 /* free graph: */
115 free(g);
116}
117#endif
118
119static Node node_create(void)

Callers

nothing calls this directly

Calls 1

attrs_freeFunction · 0.85

Tested by

no test coverage detected