diff --git a/lib/libc/iconv/bsd_iconv.c b/lib/libc/iconv/bsd_iconv.c index 40a1a4e88909..f764886d7851 100644 --- a/lib/libc/iconv/bsd_iconv.c +++ b/lib/libc/iconv/bsd_iconv.c @@ -83,6 +83,7 @@ __bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle } handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_ilseq_invalid = false; handle->cv_shared->ci_hooks = NULL; return ((iconv_t)(void *)handle); @@ -223,7 +224,7 @@ __bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, return; } strlcpy(curkey, list[i], slashpos - list[i] + 1); - names[j++] = strdup(curkey); + names[j++] = curkey; for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { slashpos = strchr(list[i], '/'); curitem = (char *)malloc(strlen(slashpos) + 1); @@ -235,7 +236,7 @@ __bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, if (strcmp(curkey, curitem) == 0) { continue; } - names[j++] = strdup(curitem); + names[j++] = curitem; } np = (const char * const *)names; do_one(j, np, data);