Closed memory leak with lack of memory during character set conversion.

Coverity CID 12566.
This commit is contained in:
Thomas Schmitt 2015-10-09 14:14:55 +02:00
parent b9ccdeda72
commit d8fb8b26a6

View File

@ -436,6 +436,7 @@ int str2ascii(const char *icharset, const char *input, char **output)
ret_ = malloc(numchars + 1);
if (ret_ == NULL) {
free(wsrc_);
return ISO_OUT_OF_MEM;
}
outbytes = numchars;