Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.4.1
-
None
Description
If one uses fromAscii() and toAscii() to convert between char* and QByteArray, it all works fine without the line below:
QTextCodec::setCodecForCStrings( QTextCodec::codecForLocale() );
With it, one gets memory leaks, as reported by Valgrind. In qiconvcodec.cpp:
if (iconv(cd, &inBytes, &inBytesLeft, &outBytes, &outBytesLeft) == (size_t) -1)
{ perror("QIconvCodec::convertFromUnicode: using ASCII for conversion, iconv failed for BOM"); return QString(uc, len).toAscii(); }
return is called without iconv_close() first.