From d034c1ee0c5b7d442d1ef6a66b995f74f13ce930 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 31 Jan 2022 08:42:07 -0800 Subject: [PATCH 17/43] shuf: simplify -fsanitize=leak pacification * src/shuf.c (main) [lint]: Omit unnecessary cleanup. Use main_exit, not return. --- src/shuf.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/shuf.c b/src/shuf.c index 7f696d6b0..68ca609eb 100644 --- a/src/shuf.c +++ b/src/shuf.c @@ -595,22 +595,5 @@ main (int argc, char **argv) if (i != 0) die (EXIT_FAILURE, errno, _("write error")); -#ifdef lint - free (permutation); - randint_all_free (randint_source); - if (input_lines) - { - free (input_lines[0]); - free (input_lines); - } - if (reservoir) - { - size_t j; - for (j = 0; j < n_lines; ++j) - freebuffer (&reservoir[j]); - free (reservoir); - } -#endif - - return EXIT_SUCCESS; + main_exit (EXIT_SUCCESS); } -- 2.32.0