From 7dc476b70031aae196f37be8267b96e3230aa873 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Wed, 5 Dec 2007 23:05:53 -0800 Subject: [PATCH] Don't return without freeing, in convert_all_links function. --- src/ChangeLog | 2 ++ src/convert.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5b04663f..42c8cec4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2007-12-05 Micah Cowan * 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 diff --git a/src/convert.c b/src/convert.c index 88474c6d..1c95a308 100644 --- a/src/convert.c +++ b/src/convert.c @@ -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); -- 2.39.2