mirror of
https://github.com/mirror/wget.git
synced 2025-01-03 00:40:28 +08:00
* src/init.c (cleanup): Never call cleanup() twice
This commit is contained in:
parent
e0860dd1ff
commit
d7e3acb2cc
@ -1890,8 +1890,12 @@ extern struct ptimer *timer;
|
||||
void
|
||||
cleanup (void)
|
||||
{
|
||||
static int cleaned_up;
|
||||
/* Free external resources, close files, etc. */
|
||||
|
||||
if (cleaned_up++)
|
||||
return; /* cleanup() must not be called twice */
|
||||
|
||||
/* Close WARC file. */
|
||||
if (opt.warc_filename != 0)
|
||||
warc_close ();
|
||||
|
Loading…
Reference in New Issue
Block a user