Software /
code /
prosody
Diff
util-src/encodings.c @ 1836:f4c88dd32724
Merge with 0.5
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 27 Sep 2009 12:26:51 +0100 |
parent | 1829:3d0db768be2f |
child | 1844:a4a8fe2a560c |
child | 1854:7e055cc6bc90 |
line wrap: on
line diff
--- a/util-src/encodings.c Thu Sep 24 23:47:16 2009 +0100 +++ b/util-src/encodings.c Sun Sep 27 12:26:51 2009 +0100 @@ -172,11 +172,11 @@ int ret = idna_to_ascii_8z(s, &output, 0); if (ret == IDNA_SUCCESS) { lua_pushstring(L, output); - if (output) free(output); + idn_free(output); return 1; } else { lua_pushnil(L); - if (output) free(output); + idn_free(output); return 1; // TODO return error message } } @@ -189,11 +189,11 @@ int ret = idna_to_unicode_8z8z(s, &output, 0); if (ret == IDNA_SUCCESS) { lua_pushstring(L, output); - if (output) free(output); + idn_free(output); return 1; } else { lua_pushnil(L); - if (output) free(output); + idn_free(output); return 1; // TODO return error message } }