The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.
erec *ep;
erec *next;
graph_t *sg = ND_clust(n);
- bport_t *pp;
int sz = WDEG(n);
int idx = 0;
double bnd;
if (sz != 0) {
/* freed in cleanup_subgs */
- pp = N_NEW(sz + 1, bport_t);
+ bport_t *pp = gv_calloc(sz + 1, sizeof(bport_t));
/* create sorted list of edges of n */
es = ep = getEdgeList(n, cg);