]> sjero.net Git - wget/commitdiff
Don't return without freeing, in convert_all_links function.
authorMicah Cowan <micah@cowan.name>
Thu, 6 Dec 2007 07:05:53 +0000 (23:05 -0800)
committerMicah Cowan <micah@cowan.name>
Thu, 6 Dec 2007 07:05:53 +0000 (23:05 -0800)
src/ChangeLog
src/convert.c

index 5b04663fec246bbea8c6ff95ac02056986c2bdfe..42c8cec42fb16d3bc1163b988a57db1175b4c897 100644 (file)
@@ -1,6 +1,8 @@
 2007-12-05  Micah Cowan  <micah@cowan.name>
 
        * utils.c (subdir_p): Handle the case where d1 is "".
+       * convert.c (convert_all_links): Don't return without
+       deallocating timer.
 
 2007-11-28  Micah Cowan  <micah@cowan.name>
 
index 88474c6d5fd4f67168316ddc455098c8fb35fcff..1c95a30849e6686a5eb3a0c6b77602703205dfcf 100644 (file)
@@ -85,7 +85,7 @@ convert_all_links (void)
   if (downloaded_html_set)
     cnt = hash_table_count (downloaded_html_set);
   if (cnt == 0)
-    return;
+    goto cleanup;
   file_array = alloca_array (char *, cnt);
   string_set_to_array (downloaded_html_set, file_array);
 
@@ -166,9 +166,10 @@ convert_all_links (void)
     }
 
   secs = ptimer_measure (timer);
-  ptimer_destroy (timer);
   logprintf (LOG_VERBOSE, _("Converted %d files in %s seconds.\n"),
              file_count, print_decimal (secs));
+cleanup:
+  ptimer_destroy (timer);
 }
 
 static void write_backup_file (const char *, downloaded_file_t);