mirror of
https://github.com/mirror/wget.git
synced 2025-01-28 05:10:35 +08: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))
|
if (unlink (filename))
|
||||||
logprintf (LOG_NOTQUIET, "unlink: %s\n", strerror (errno));
|
logprintf (LOG_NOTQUIET, "unlink: %s\n", strerror (errno));
|
||||||
}
|
}
|
||||||
fclose (output_stream);
|
if (output_stream)
|
||||||
output_stream = NULL;
|
{
|
||||||
|
fclose (output_stream);
|
||||||
|
output_stream = NULL;
|
||||||
|
}
|
||||||
xfree (filename);
|
xfree (filename);
|
||||||
} /* Iterate over files. */
|
} /* Iterate over files. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user