]> sjero.net Git - wget/blobdiff - src/convert.c
[svn] Free converted_files.
[wget] / src / convert.c
index 33981a3eab72793f59034911e406b25cd644899c..7ce42cb21b9291ee64135db236ec07c7ebff528d 100644 (file)
@@ -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);
 }
 \f
 /* Book-keeping code for downloaded files that enables extension