summaryrefslogtreecommitdiff
path: root/src/pr.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-09-04 14:38:06 +0100
committerPádraig Brady <P@draigBrady.com>2015-09-04 17:04:03 +0100
commita4b640549df3216282f9d9924901b1521c3e2d69 (patch)
treeccc7540dac6f44652ece8594ff198ed5b58bc55e /src/pr.c
parent26c11773a4bf16c58d12240d1b6d6fa2856b51f1 (diff)
downloadcoreutils-a4b640549df3216282f9d9924901b1521c3e2d69.tar.xz
maint: avoid "definitely lost" valgrind warnings
Since commit v8.23-19-g8defcee, main() will return, rather than call exit(), this inducing "definitely lost" warnings in valgrind's leak checker. That precludes using the following to flag memory leaks: valgrind --leak-check=full --error-exitcode=1 \ --errors-for-leak-kinds=definite * src/pr.c (main): In dev builds, explicitly free memory allocated. * src/sort.c (main): Likewise. * src/tail.c (main): Likewise. * src/tsort.c (tsort): Likewise.
Diffstat (limited to 'src/pr.c')
-rw-r--r--src/pr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pr.c b/src/pr.c
index d79d84f18..887e12584 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -1130,6 +1130,7 @@ main (int argc, char **argv)
}
cleanup ();
+ IF_LINT (free (file_names));
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));