Several input codecs allocate memory for node labels
and node and edge names (with strdup and new[]) which
is never freed. This is a memory leak, which is
tolerable for command-line use (only one constraint is
parsed per run of the program), but may become a bit of
a problem for the server mode.
One idea for solving this is to make EdgeData,
NodeData, and NodeLabels allocate their own memory for
the names and labels. However, this leads to one of the
following kinds of behaviour: (a) The program hangs in
malloc(); (b) the program aborts with a segmentation
fault in a malloc(). This is not a segfault in free()
for unallocated memory; the free() goes through ok,
it's only the next malloc() or strdup() or new[] that
fails. The attached version of nodedata.cc illustrates
the problem.
nodedata.cc that causes a segfault