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
This commit is contained in:
Pádraig Brady committed 2010-11-27 03:27:49 +00:00
1 parent 67f7ed3e3a
commit b8cd747cc8
1 file changed
+5
+5
View File
@@ -487,6 +487,11 @@ tsort (const char *file)
/* T5. Output front of queue. */
puts (head->str);
#ifdef lint
/* suppress valgrind "definitely lost" warnings. */
void *head_str = (void *) head->str;
free (head_str);
#endif
head->str = NULL; /* Avoid printing the same string twice. */
n_strings--;