X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Finit.c;fp=src%2Finit.c;h=40b62b2715c44882603c004c0cb54e9222d55feb;hp=d5f9a4f09bdb9c0d447a59b0333df96a59555915;hb=90e9d9e1bd98dcb1ab286d696acf790cf3758a6a;hpb=93720df4c8d76af7848267f8197ed76eea21f181 diff --git a/src/init.c b/src/init.c index d5f9a4f0..40b62b27 100644 --- a/src/init.c +++ b/src/init.c @@ -1675,6 +1675,12 @@ cleanup (void) { /* Free external resources, close files, etc. */ + /* Close WARC file. */ + if (opt.warc_filename != 0) + warc_close (); + + log_close (); + if (output_stream) fclose (output_stream); /* No need to check for error because Wget flushes its output (and @@ -1696,6 +1702,9 @@ cleanup (void) host_cleanup (); log_cleanup (); + for (i = 0; i < nurl; i++) + xfree (url[i]); + { extern acc_t *netrc_list; free_netrc (netrc_list);