Bug fix: Double free if no charset WCHAR_T is available. Coverity CID 12597.
(previous was CID 12601)
This commit is contained in:
parent
7b7da47d86
commit
fc448e09c9
@ -445,7 +445,9 @@ int str2ascii(const char *icharset, const char *input, char **output)
|
|||||||
conv_ret = iso_iconv_open(&conv, "ASCII", "WCHAR_T", 0);
|
conv_ret = iso_iconv_open(&conv, "ASCII", "WCHAR_T", 0);
|
||||||
if (conv_ret <= 0) {
|
if (conv_ret <= 0) {
|
||||||
free(wsrc_);
|
free(wsrc_);
|
||||||
|
wsrc_ = NULL;
|
||||||
free(ret_);
|
free(ret_);
|
||||||
|
ret = ret_ = NULL;
|
||||||
}
|
}
|
||||||
} else if (result != (int) ISO_CHARSET_CONV_ERROR)
|
} else if (result != (int) ISO_CHARSET_CONV_ERROR)
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user