diff options
-rw-r--r-- | src/pr.c | 1 | ||||
-rw-r--r-- | src/sort.c | 2 | ||||
-rw-r--r-- | src/tail.c | 2 | ||||
-rw-r--r-- | src/tsort.c | 2 |
4 files changed, 7 insertions, 0 deletions
@@ -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")); diff --git a/src/sort.c b/src/sort.c index 85fc38f73..a7eda8325 100644 --- a/src/sort.c +++ b/src/sort.c @@ -4742,6 +4742,8 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } + IF_LINT (free (files)); + if (have_read_stdin && fclose (stdin) == EOF) die (_("close failed"), "-"); diff --git a/src/tail.c b/src/tail.c index c062d403f..f916d7460 100644 --- a/src/tail.c +++ b/src/tail.c @@ -2354,6 +2354,8 @@ main (int argc, char **argv) tail_forever (F, n_files, sleep_interval); } + IF_LINT (free (F)); + if (have_read_stdin && close (STDIN_FILENO) < 0) error (EXIT_FAILURE, errno, "-"); return ok ? EXIT_SUCCESS : EXIT_FAILURE; diff --git a/src/tsort.c b/src/tsort.c index d4be03d42..0533451da 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -528,6 +528,8 @@ tsort (const char *file) } } + IF_LINT (free (root)); + if (fclose (stdin) != 0) error (EXIT_FAILURE, errno, "%s", is_stdin ? _("standard input") : quote (file)); |