From 2096772fbeaa8cfe8b760e3919a824ec037e4042 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 17 Jun 2023 00:37:08 -0700 Subject: [PATCH] Omit unnecessary freeing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/extract.c (apply_delayed_link): Don’t bother to free memory, as we’re about to exit. --- src/extract.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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. */