A bit simpler patch:
--- a/url.c 2017-04-08 11:24:21
+++ b/url.c 2017-04-08 12:01:07
@@ -943,7 +943,8 @@
if (new)
{
xfree (u->host);
- u->host = new;
+ u->host = xstrdup (new);
+ idn2_free (new);
host_modified = true;
}
}-- --gv
