From: Paul Eggert Date: Sat, 17 Jun 2023 07:37:08 +0000 (-0700) Subject: Omit unnecessary freeing X-Git-Tag: v1.35~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2096772fbeaa8cfe8b760e3919a824ec037e4042;p=thirdparty%2Ftar.git Omit unnecessary freeing * src/extract.c (apply_delayed_link): Don’t bother to free memory, as we’re about to exit. --- diff --git a/src/extract.c b/src/extract.c index bc2abbfe..3bf407bc 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1927,15 +1927,20 @@ apply_delayed_link (struct delayed_link *ds) } } - for (sources = ds->sources; sources; ) + /* There is little point to freeing, as we are about to exit, + and freeing is more likely to cause than cure trouble. */ + if (false) { - struct string_list *next = sources->next; - free (sources); - sources = next; - } + for (sources = ds->sources; sources; ) + { + struct string_list *next = sources->next; + free (sources); + sources = next; + } - xattr_map_free (&ds->xattr_map); - free (ds->cntx_name); + xattr_map_free (&ds->xattr_map); + free (ds->cntx_name); + } } /* Extract the links whose final extraction were delayed. */