diff --git a/src/http.c b/src/http.c index 632c201a..87ff395e 100644 --- a/src/http.c +++ b/src/http.c @@ -1772,6 +1772,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen, else { /* A read error! */ + xfree (hs->rderrmsg); hs->rderrmsg = xstrdup (fd_errstr (sock)); return RETRFINISHED; }