From be684b81e510298ea7ab17e40ab329ce6e227563 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sun, 10 Apr 2005 16:39:41 -0700 Subject: [PATCH] [svn] Free converted_files. --- src/ChangeLog | 4 ++++ src/convert.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fc0cef3c..e0665610 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-04-11 Hrvoje Niksic + + * convert.c (convert_cleanup): Free converted_files. + 2005-04-10 Hrvoje Niksic * wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that diff --git a/src/convert.c b/src/convert.c index 33981a3e..7ce42cb2 100644 --- a/src/convert.c +++ b/src/convert.c @@ -395,6 +395,10 @@ construct_relative (const char *basefile, const char *linkfile) return link; } +/* Used by write_backup_file to remember which files have been + written. */ +static struct hash_table *converted_files; + static void write_backup_file (const char *file, downloaded_file_t downloaded_file_return) { @@ -406,7 +410,6 @@ write_backup_file (const char *file, downloaded_file_t downloaded_file_return) /* Construct the backup filename as the original name plus ".orig". */ size_t filename_len = strlen (file); char* filename_plus_orig_suffix; - static struct hash_table *converted_files; if (downloaded_file_return == FILE_DOWNLOADED_AND_HTML_EXTENSION_ADDED) { @@ -856,6 +859,8 @@ convert_cleanup (void) if (downloaded_html_set) string_set_free (downloaded_html_set); downloaded_files_free (); + if (converted_files) + string_set_free (converted_files); } /* Book-keeping code for downloaded files that enables extension -- 2.39.2