diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-11-29 13:41:09 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-12-02 17:38:33 +0100 |
commit | 24e437041487a198057c02a1dd60c78d024af11f (patch) | |
tree | 012b9517e9699017e2babffab34a2c028a577834 /src/plugins/sqldrivers | |
parent | 4ef8e9427c2703146d0b97d16cfdeb2e73185bc8 (diff) |
Close leak of QOCIDateTime object
Noticed while reviewing usage of this type. The code has a whole
TempStorage class to take care of keeping allocated memory live until
we're done with it, explicitly including date-time objects as a
special case, but neglected to use it in one place.
Pick-to: 6.2 5.15
Change-Id: Ic94c56d67dda6dc3ee36a025a2e0149f6b2a1837
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r-- | src/plugins/sqldrivers/oci/qsql_oci.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp index b0f68c0d09..b395c41d0f 100644 --- a/src/plugins/sqldrivers/oci/qsql_oci.cpp +++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp @@ -1497,6 +1497,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a columns[i].lengths[row] = columns[i].maxLen; QOCIDateTime *date = new QOCIDateTime(d->env, d->err, val.toDateTime()); *reinterpret_cast<OCIDateTime**>(dataPtr) = date->dateTime; + tmpStorage.dateTimes.append(date); break; } case QMetaType::Int: |