]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
date: simplify -fsanitize=leak pacification
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2022 16:42:07 +0000 (08:42 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jan 2022 20:07:39 +0000 (12:07 -0800)
* src/date.c (main) [lint]: Omit unnecessary cleanup.
Use main_exit, not return.

src/date.c

index 18ff22287e61cc2728215317f039e4894a4b6163..0915d7c64712e4cf89b32f82c27b6d4a9df346da 100644 (file)
@@ -624,10 +624,7 @@ main (int argc, char **argv)
       ok &= show_date (format_res, when, tz);
     }
 
-  IF_LINT (tzfree (tz));
-  IF_LINT (free (format_copy));
-
-  return ok ? EXIT_SUCCESS : EXIT_FAILURE;
+  main_exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
 }
 
 /* Display the date and/or time in WHEN according to the format specified