From 8c2d9afd08d0b52e85238a5a1911d3e8d8dc5b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Tue, 30 Sep 2014 16:02:24 +0200 Subject: [PATCH] fixed memleak in retrieve_url() --- src/ChangeLog | 4 ++++ src/retr.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index f677f128..1c4e2d5b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-05-03 Tim Ruehsen + + * retr.c (retrieve_url): fixed memory leak + 2014-07-23 Darshit Shah * http.c (gethttp): Fix a memory leak when retrying authorization diff --git a/src/retr.c b/src/retr.c index 461b17a5..71b5c288 100644 --- a/src/retr.c +++ b/src/retr.c @@ -913,6 +913,10 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file, goto redirected; } + else + { + xfree(mynewloc); + } /* Try to not encode in UTF-8 if fetching failed */ if (!(*dt & RETROKF) && iri->utf8_encode)