projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67f7ed3
)
tsort: suppress a valgrind memory leak warning
author
Pádraig Brady
<P@draigBrady.com>
Thu, 25 Nov 2010 19:16:00 +0000
(19:16 +0000)
committer
Pádraig Brady
<P@draigBrady.com>
Sat, 27 Nov 2010 03:27:49 +0000
(
03:27
+0000)
* src/tsort.c (tsort): Unconditionally invoking the free()
doesn't increase scalability, so do it only with -Dlint
src/tsort.c
patch
|
blob
|
history
diff --git
a/src/tsort.c
b/src/tsort.c
index
4f51f30
..
0179a4e
100644
(file)
--- a/
src/tsort.c
+++ b/
src/tsort.c
@@
-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--;