mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix null pointer dereference
* src/metalink.c (gpg_skip_verification): Check output_stream before fclose
This commit is contained in:
parent
88a1a79bc1
commit
c809398e8c
@ -427,8 +427,11 @@ gpg_skip_verification:
|
||||
if (unlink (filename))
|
||||
logprintf (LOG_NOTQUIET, "unlink: %s\n", strerror (errno));
|
||||
}
|
||||
fclose (output_stream);
|
||||
output_stream = NULL;
|
||||
if (output_stream)
|
||||
{
|
||||
fclose (output_stream);
|
||||
output_stream = NULL;
|
||||
}
|
||||
xfree (filename);
|
||||
} /* Iterate over files. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user