* src/retr.c (fd_read_body): Check timer before accessing (Coverity #600494)

This commit is contained in:
Tim Rühsen 2020-02-21 17:46:41 +01:00
parent c65bddc086
commit 9934e228ac

View File

@ -559,10 +559,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread,
if (progress)
progress_finish (progress, ptimer_read (timer));
if (elapsed)
*elapsed = ptimer_read (timer);
if (timer)
ptimer_destroy (timer);
{
if (elapsed)
*elapsed = ptimer_read (timer);
ptimer_destroy (timer);
}
#ifdef HAVE_LIBZ
if (gzbuf != NULL)