intlconv: Do not free alloca-ted string

This commit is contained in:
Jaroslav Kysela 2014-09-13 18:07:07 +02:00
parent 22eeadfac4
commit 1ac14a2d5b

View file

@ -152,9 +152,7 @@ intlconv_utf8safestr( const char *dst_charset_id,
r--;
str[r++] = '\0';
res = strdup(str);
if (res == NULL) {
free(str);
} else {
if (res != NULL) {
/* don't terminate string */
for (i = 0; i < r - 1; i++)
if (str[i] == '\0')