Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.2
-
Windows 10; Oracle 12.2 Client
-
-
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
For Gerrit Dashboard: QTBUG-94246 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
355780,4 | Fix leak of transaction context handle in QSql's OCI driver | dev | qt/qtbase | Status: MERGED | +2 | 0 |
356195,2 | Fix leak of transaction context handle in QSql's OCI driver | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
356196,2 | Fix leak of transaction context handle in QSql's OCI driver | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
356199,2 | Fix leak of transaction context handle in QSql's OCI driver | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |