Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-240

Incorrect cleanup stack usage in QNetworkConfigurationPrivate class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: Bearer Management
    • Labels:
      None
    • Commits:
      c84a6d828bcb7f66d1ac06e1a7a84c5a8ba9cec4

      Description

      1) In configFromConnectionMethodL and updateConfigurationsL methods Qt class is pushed to the cleanup stack (only Symbian / CBased classes should be pushed to the cleanup stack)

      QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
      CleanupStack::PushL(cpPriv);

      2) In configFromConnectionMethodL exception in QString::fromUtf16 method call causes memory leak. QT_TRYCATCH_LEAVING macro should be used to convert the Qt code to leaving one so cleanup stack would work correctly.

      CleanupStack::PushL(pName);
      cpPriv->mappingName = QString::fromUtf16(pName->Ptr(),pName->Length());
      CleanupStack::PopAndDestroy(pName);

        Attachments

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

          Activity

            People

            Assignee:
            juvuolle Juha Vuolle (closed Nokia identity) (Inactive)
            Reporter:
            janne koponen Janne Koponen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes