Blame SOURCES/wget-1.14-fix-double-free-of-iri-orig_url.patch

87e294
From bdf2764457bef7c33be289b889ddf6df91773296 Mon Sep 17 00:00:00 2001
87e294
From: Tomas Hozza <thozza@redhat.com>
87e294
Date: Wed, 10 Jul 2013 13:23:37 +0200
87e294
Subject: [PATCH] Set iri->orig_url to NULL after free.
87e294
87e294
Set iri->orig_url to NULL after free to prevent double
87e294
free in retrieve_url() and iri_free() when using IRI
87e294
and downloading site that redirects itself.
87e294
87e294
Signed-off-by: Tomas Hozza <thozza@redhat.com>
87e294
---
87e294
 src/retr.c | 1 +
87e294
 1 file changed, 1 insertion(+)
87e294
87e294
diff --git a/src/retr.c b/src/retr.c
87e294
index 6204839..66624dc 100644
87e294
--- a/src/retr.c
87e294
+++ b/src/retr.c
87e294
@@ -838,6 +838,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
87e294
       iri->utf8_encode = opt.enable_iri;
87e294
       set_content_encoding (iri, NULL);
87e294
       xfree_null (iri->orig_url);
87e294
+      iri->orig_url = NULL;
87e294
 
87e294
       /* Now, see if this new location makes sense. */
87e294
       newloc_parsed = url_parse (mynewloc, &up_error_code, iri, true);
87e294
-- 
87e294
1.8.3.1
87e294