Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3270

Memory leak using iconv_open

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.5.0
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes