* src/iri.c: Fix WIN32 idn2_free, forgotten code

This commit is contained in:
Tim Rühsen 2017-04-16 19:50:10 +02:00
parent b2c38d33e1
commit fc2f4233ed

View File

@ -290,6 +290,13 @@ idn_encode (const struct iri *i, const char *host)
xfree (utf8_encoded);
if (ret == IDN2_OK && ascii_encoded)
{
char *tmp = xstrdup (ascii_encoded);
idn2_free (ascii_encoded);
ascii_encoded = tmp;
}
return ret == IDN2_OK ? ascii_encoded : NULL;
}