Fix compiler warning: expression has no effect
Fix OOM handling
const char *inputbuff, size_t insize,
char **outptr)
{
+ CURLcode res;
unsigned char ibuf[3];
unsigned char obuf[4];
int i;
* not the host encoding. And we can't change the actual input
* so we copy it to a buffer, translate it, and use that instead.
*/
- if(Curl_convert_clone(data, indata, insize, &convbuf))
+ res = Curl_convert_clone(data, indata, insize, &convbuf);
+ if(res) {
+ free(output);
return 0;
+ }
if(convbuf)
indata = (char *)convbuf;