From b5da6c13f8e293af303a71b63b706acd73bec359 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 31 Jan 2022 08:42:07 -0800 Subject: [PATCH 16/43] numfmt: simplify -fsanitize=leak pacification * src/numfmt.c (main) [lint]: Omit unnecessary cleanup. Use main_exit, not return. --- src/numfmt.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/numfmt.c b/src/numfmt.c index 578aa558a..fccb47480 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -1627,19 +1627,10 @@ main (int argc, char **argv) valid_numbers &= process_line (line, newline); } - IF_LINT (free (line)); - if (ferror (stdin)) error (0, errno, _("error reading input")); } -#ifdef lint - free (padding_buffer); - free (format_str_prefix); - free (format_str_suffix); - reset_fields (); -#endif - if (debug && !valid_numbers) error (0, 0, _("failed to convert some of the input numbers")); @@ -1648,5 +1639,5 @@ main (int argc, char **argv) && inval_style != inval_warn && inval_style != inval_ignore) exit_status = EXIT_CONVERSION_WARNINGS; - return exit_status; + main_exit (exit_status); } -- 2.32.0