Closed memory leak with lack of memory during character set conversion.
Coverity CID 12566.
This commit is contained in:
parent
b9ccdeda72
commit
d8fb8b26a6
@ -436,6 +436,7 @@ int str2ascii(const char *icharset, const char *input, char **output)
|
|||||||
|
|
||||||
ret_ = malloc(numchars + 1);
|
ret_ = malloc(numchars + 1);
|
||||||
if (ret_ == NULL) {
|
if (ret_ == NULL) {
|
||||||
|
free(wsrc_);
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_OUT_OF_MEM;
|
||||||
}
|
}
|
||||||
outbytes = numchars;
|
outbytes = numchars;
|
||||||
|
Loading…
Reference in New Issue
Block a user