From: Paul Eggert Date: Mon, 31 Jan 2022 16:42:07 +0000 (-0800) Subject: numfmt: simplify -fsanitize=leak pacification X-Git-Tag: v9.1~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8692f2a6d3013bba4743a5d8df39b915143e93cd;p=thirdparty%2Fcoreutils.git numfmt: simplify -fsanitize=leak pacification * src/numfmt.c (main) [lint]: Omit unnecessary cleanup. Use main_exit, not return. --- diff --git a/src/numfmt.c b/src/numfmt.c index 578aa558ac..fccb47480b 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); }