1
0
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:
Tim Rühsen 2015-08-30 14:17:47 +02:00
parent 88a1a79bc1
commit c809398e8c

View File

@ -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));
} }
if (output_stream)
{
fclose (output_stream); fclose (output_stream);
output_stream = NULL; output_stream = NULL;
}
xfree (filename); xfree (filename);
} /* Iterate over files. */ } /* Iterate over files. */