From 9fab5a9f287ef43e3ef28a0de72862c90f47241d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 18 Aug 2011 15:17:20 +0200 Subject: [PATCH] Fix a memory leak. --- src/ChangeLog | 7 ++++--- src/http.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) 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; } -- 2.39.2