This is the only "definitely lost" warning left from valgrind --tool=memcheck.
commit c8b88772b61ffb3d9f73fc6b9985ec7b35495f87 Author: Pádraig Brady <[email protected]> Date: Thu Nov 25 19:16:00 2010 +0000 tsort: suppress a valgrind memory leak warning * src/tsort.c (tsort): Unconditionally invoking the free() doesn't increase scalability, so do it only with -Dlint diff --git a/src/tsort.c b/src/tsort.c index 4f51f30..b27cdfa 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -487,6 +487,10 @@ tsort (const char *file) /* T5. Output front of queue. */ puts (head->str); +#ifdef lint + /* suppress valgrind "definitely lost" warnings. */ + free ((void *) head->str); +#endif head->str = NULL; /* Avoid printing the same string twice. */ n_strings--;
