diff --git a/src/ChangeLog b/src/ChangeLog index 7389d059..b4420ccd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,10 +1,11 @@ -2011-08-18 Giuseppe Scrivano +2011-08-18 Giuseppe Scrivano + + * http.c (gethttp): Fix a memory leak on some errors. Free the head + buffer. * Makefile.am: Use an additional file "css_.c" which in turn includes "wget.h" and immediately "css.c". -2011-08-18 Giuseppe Scrivano - * http.c (gethttp): Reset chunked_transfer_encoding on redirections. Reported by: Axel Reinhold . diff --git a/src/http.c b/src/http.c index b7026cd8..fc88118f 100644 --- a/src/http.c +++ b/src/http.c @@ -1986,12 +1986,14 @@ read_header: _("Malformed status line"))); CLOSE_INVALIDATE (sock); request_free (req); + xfree (head); return HERR; } if (H_10X (statcode)) { DEBUGP (("Ignoring response\n")); + xfree (head); goto read_header; }