Number: 16
Title: Memory Leak
Submitter: Chanh-Duy Tran
Date: Mon Jun 4 13:59:11 2001
Subsys: Libagraph
Version: 1.7c
System: *-*-
Severity: critical
Problem:
agclose() does not appear to be releasing all memory that it allocates. Results in memory leak after many graphs have been created/destroyed.
Input:
while (1) {
  g = agopen("g", AGDIGRAPH);
  agclose(g);
}
Fix:
-- ellson -- What a can-of-worms this one was!

Anyway, the dot layout engine is now clean of leaks, at least for this test.

Neato still leaks, but enough for tonight....

The leaks were found with the assistance of "dmalloc" from http://dmalloc.com/ (also in RedHat Rawhide, meaning it should be a part of future RedHat distributions.)

I liked dmalloc so much that I also added a "--with-dmalloc" target to configure to make it easier to find leaks in the future.
Owner: ellson
Status: Fixed