When accessing a URL using IDN which directly redirects to another page,
wget would xfree_null(iri->orig_url); in src/retr.c:retrieve_url()
first, then later xfree_null(iri->orig_url); in src/iri.c:iri_free()
again.
This can be tested with wget -O /dev/null http://μφ.net
+2012-12-08 Michael Stapelberg <michael@stapelberg.de> (tiny change)
+
+ * retr.c (retrieve_url): Set iri->orig_url to NULL after it is
+ freed.
+
2012-11-26 Giuseppe Scrivano <gscrivano@gnu.org>
* wget.h (MAX_INT_TO_STRING_LEN): Define macro.
2012-11-26 Giuseppe Scrivano <gscrivano@gnu.org>
* wget.h (MAX_INT_TO_STRING_LEN): Define macro.
iri->utf8_encode = opt.enable_iri;
set_content_encoding (iri, NULL);
xfree_null (iri->orig_url);
iri->utf8_encode = opt.enable_iri;
set_content_encoding (iri, NULL);
xfree_null (iri->orig_url);
/* Now, see if this new location makes sense. */
newloc_parsed = url_parse (mynewloc, &up_error_code, iri, true);
/* Now, see if this new location makes sense. */
newloc_parsed = url_parse (mynewloc, &up_error_code, iri, true);