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

Potential memory leak in QVersionNumber pointed out by clazy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.15.2
    • Core: Other
    • None
    • All

    Description

        const QStringList versions{"1.0", "2.0", "3.0"};
          QVersionNumber vn(1, 0, 0);
          for (const auto &v : versions) {
              auto parsedVn = QVersionNumber::fromString(v);
              if (!parsedVn.isNull() && parsedVn > vn)
                  vn = parsedVn;
          }
      

      produces the warning visible in the image. valgrind does not report any issues, though. It might be a false positive.

      Potential memory leak of memory pointed to by 'vn.m_segments..pointer_segments'
      

      Attachments

        1. qtbug89911.jpg
          qtbug89911.jpg
          235 kB
        2. qtbug89911.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            kleint Friedemann Kleint
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes