From: Paul Eggert Date: Sun, 25 Jun 2023 18:33:01 +0000 (-0700) Subject: tar: omit unnecessary freeing X-Git-Tag: v1.35~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90cceec4bb58e5ce2a2045a7062cd3fee4b322d9;p=thirdparty%2Ftar.git tar: omit unnecessary freeing * src/tar.c (main): Omit unnecessary freeing. --- diff --git a/src/tar.c b/src/tar.c index d65fc806..8dbd737b 100644 --- a/src/tar.c +++ b/src/tar.c @@ -2852,11 +2852,14 @@ main (int argc, char **argv) if (volno_file_option) closeout_volume_number (); - /* Dispose of allocated memory, and return. */ - - free (archive_name_array); - xattrs_clear_setup (); - name_term (); + /* There is little point to freeing, as we are about to exit, + and freeing is more likely to cause than cure trouble. */ + if (false) + { + free (archive_name_array); + xattrs_clear_setup (); + name_term (); + } if (exit_status == TAREXIT_FAILURE) error (0, 0, _("Exiting with failure status due to previous errors"));