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

<coverity> defects from qt-mobility/1.1.1_git20110106_0m6 [Bugzilla 220391]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 1.1.0
    • Messaging
    • None

    Description

      Sriram Jagadeesh (TCS) 2011-01-19 15:23:27 EET

      SOFTWARE VERSION:
      qt-mobility/1.1.1_git20110106_0m6

      Please fix the following defects found in latest coverity run.

      Defect 1#
      CID: 39174
      Checker: RESOURCE_LEAK
      Function: QtMobility::messagingHelper()
      File:
      /home/covharmattan/cov-build/harmattan/qt-mobility/1.1.1_git20110106_0m6/src/messaging/maemo6helpers.cpp
      50 QTM_BEGIN_NAMESPACE
      51
      Event alloc_fn: Called allocation function "operator new (unsigned int)"
      Event var_assign: Assigned variable "x" to storage returned from "new struct
      QtMobility::MessagingHelper()"
      Event noescape: Variable "<storage from new>" not freed or pointed-to in
      function "QtMobility::MessagingHelper::MessagingHelper()" [details]
      Event leaked_storage: Variable "x" goes out of scope
      Event noescape: Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QtMobility::MessagingHelper>::testAndSetOrdered(QtMobility::MessagingHelper
      *, QtMobility::MessagingHelper *)" [details]
      At conditional (1):
      "!QtMobility::this_messagingHelper.pointer.testAndSetOrdered(NULL, x)" taking
      false path
      52 Q_GLOBAL_STATIC(MessagingHelper, messagingHelper);

      Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QtMobility::MessagingHelper>::testAndSetOrdered(QtMobility::MessagingHelper
      *, QtMobility::MessagingHelper *)"

      Defect 2#
      CID: 39173
      Checker: RESOURCE_LEAK
      Function: QtMobility::QMessagePrivate::standardFolderMap()
      File:
      /home/covharmattan/cov-build/harmattan/qt-mobility/1.1.1_git20110106_0m6/src/messaging/qmessage_maemo6.cpp
      48 QTM_BEGIN_NAMESPACE
      49
      Event alloc_fn: Called allocation function "operator new (unsigned int)"
      Event var_assign: Assigned variable "x" to storage returned from "new
      QtMobility::QMessagePrivate::StandardFolderMap()"
      Event noescape: Variable "<storage from new>" not freed or pointed-to in
      function "QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId>::QMap()" [details]
      Event leaked_storage: Variable "x" goes out of scope
      Event noescape: Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId>>::testAndSetOrdered(QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId> *, QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId> *)" [details]
      At conditional (1):
      "!QtMobility::this_standardFolderMap.pointer.testAndSetOrdered(NULL, x)" taking
      false path
      50 Q_SCOPED_STATIC_DEFINE(QMessagePrivate::StandardFolderMap,
      QMessagePrivate, standardFolderMap);

      Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId>>::testAndSetOrdered(QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId> *, QMap<QtMobility::QMessage::StandardFolder,
      QtMobility::QMessageFolderId> *)"

      Defect 3#
      CID: 39172
      Checker: RESOURCE_LEAK
      Function: QtMobility::data()
      File:
      /home/covharmattan/cov-build/harmattan/qt-mobility/1.1.1_git20110106_0m6/src/messaging/qmessagestore_maemo6.cpp

      99
      Event alloc_fn: Called allocation function "operator new (unsigned int)"
      Event var_assign: Assigned variable "x" to storage returned from "new struct
      QtMobility::QMessageStorePrivate()"
      Event noescape: Variable "<storage from new>" not freed or pointed-to in
      function "QtMobility::QMessageStorePrivate::QMessageStorePrivate()" [details]
      Event leaked_storage: Variable "x" goes out of scope
      Event noescape: Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QtMobility::QMessageStorePrivate>::testAndSetOrdered(QtMobility::QMessageStorePrivate
      *, QtMobility::QMessageStorePrivate *)" [details]
      At conditional (1): "!QtMobility::this_data.pointer.testAndSetOrdered(NULL, x)"
      taking false path
      100 Q_GLOBAL_STATIC(QMessageStorePrivate,data);
      101

      Variable "x" not freed or pointed-to in function
      "QBasicAtomicPointer<QtMobility::QMessageStorePrivate>::testAndSetOrdered(QtMobility::QMessageStorePrivate
      *, QtMobility::QMessageStorePrivate *)"

      Defect 4#
      CID: 39242
      Checker: REVERSE_INULL
      Function: TelepathyEngine::onAMReady(Tp::PendingOperation *)
      File:
      /home/covharmattan/cov-build/harmattan/qt-mobility/1.1.1_git20110106_0m6/src/messaging/telepathyengine_maemo6.cpp

      123
      Event deref_ptr_in_call: Dereferences pointer "op" [details]
      124 m_error = convertError(op);
      125
      Event check_after_deref: Pointer "op" dereferenced before NULL check
      126 if (op && op->isError())

      { 127 qWarning() << "Account manager cannot become ready:" << op->errorName() << "-" << op->errorMessage(); 128 return; 129 }

      Dereferences pointer "op"

      Latest coverity results available
      @https://analysis.research.nokia.com:8100/cov.cgi?act=1_2_3&c=BAAAAAHA7oBw__B41B50b49&class=1_2_5&comp=%28qt-mobility%29%24&file=%28%28%3F!test%29%28%3F!example%29.%29*%24&q=6&rows=0&runs=176&sev=2&t=6&v=1

      [reply] [-] Comment 1 Kurkisuo Niklas (Tieto) 2011-01-20 09:30:13 EET

      Defect 1-3 are false, as already stated in the coverity tool.

      Created a merge request for defect #4 at
      http://qt.gitorious.org/qt-mobility/qt-mobility/merge_requests/25

      Setting status to WAITING until merge request is handled by Qt.

      Attachments

        Activity

          People

            sanders Don Sanders (closed Nokia identity) (Inactive)
            asifzubair Asif Zubair Bhatti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: