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.
}
cleanup ();
+ IF_LINT (free (file_names));
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));
sort (files, nfiles, outfile, nthreads);
}
+ IF_LINT (free (files));
+
if (have_read_stdin && fclose (stdin) == EOF)
die (_("close failed"), "-");
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;
}
}
+ IF_LINT (free (root));
+
if (fclose (stdin) != 0)
error (EXIT_FAILURE, errno, "%s",
is_stdin ? _("standard input") : quote (file));