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

Memory leak in qsql_oci plugin

    XMLWordPrintable

Details

    • Windows
    • c42ebd5ba6f1fb861cabdbe44ab10df55b9b3ada (qt/qtbase/dev) ce422dcbbbda4437e6e94b246b9e9c4a11866853 (qt/qtbase/6.2) f456e044511765d7ff10e520c0d06fa063ea1f22 (qt/tqtc-qtbase/5.15) 68ba065602b2bbe3d8ddc5500b96bee912dc8b56 (qt/qtbase/6.1)

    Description

      OCI_HTYPE_TRANS, 0, 0); 

      QOCIDriver::open function using local variable OCITrans* trans;

      r = OCIHandleAlloc(d->env, reinterpret_cast<void **>(&d->trans), OCI_HTYPE_TRANS, 0, 0); 
      

      but never get released. 

      In an application that running threads with open/close connection to DB a memory leak can be observed. 

      Solution: 

      treat OCITrans* trans in the same way as the *env variable.

      Put it in the QOCIDriverPrivate section and release it while closing connection.

       

      Attachments

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

        Activity

          People

            Eddy Edward Welbourne
            stefanlatsch Stefan Latsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes